"self" keyword
Rick C. Hodgin
foxmuldrster@yahoo.com
Thu Jun 14 20:42:00 GMT 2012
Andreas,
That would work. But now I'm back to remembering to fix something when
I copy / re-use code.
I'll admit it's minor. But we have tools to help us for a reason,
right? :-)
Best regards,
Rick C. Hodgin
On 06/14/2012 04:38 PM, Andreas Schwab wrote:
> "Rick C. Hodgin"<foxmuldrster@yahoo.com> writes:
>
>> I can also see a use for generated code where there's a base source code
>> template in use with an embedded include file reference that changes as
>> it's generated per pass, such as:
>>
>> int step1(int a, int b)
>> {
> #define self step1
>> #include "\current_task\step1.cpp"
> #undef self
>> }
>>
>> int step2(int a, int b)
>> {
> #define self step2
>> #include "\current_task\step2.cpp"
> #undef self
>> }
> Andreas.
>
More information about the Gcc
mailing list