[fpc-pascal] Re: Get all caller adresses of a given function/procedure before executing

waldo kitty wkitty42 at windstream.net
Wed Aug 15 05:33:49 CEST 2012


On 8/14/2012 22:05, Martin wrote:
> On 15/08/2012 02:52, waldo kitty wrote:
>> this would be no different than the program doing
>>
>> writeln(snippet1);
> ....
>> .i must still be missing something :?
>
> If I understood him correct:
>
> It is not
> writeln(snippet1);
> it is
> writeln('snippet1');
>
> With quotes.

yes, i caught that but thought that those were to be short examples of the 
strings...

> He does want (or already has) the text snippets as in-lined constants.

ok...

> He does not want to do the work of maintain them in another place (which an
> array, or resource string would require.)

what work? someone has to do it, somehow... it just seems better and even easier 
to have them in string variables and then just use them... i mean, ok... 
constants are one thing but they have their limits... if they are not intended 
to be constant then they should be in vars...

FWIW: i have, around here somewhere, code that does alter constants during 
execution... but it is TP6 based hackery code... in the same vein, i also have 
code that saves constants to the executable and then changes them based on 
settings... this instead of a configuration file... then there is also code to 
alter the parent environment's variables... all of these things are TP6 stuff 
but they won't work in FPC or many of today's setups... i'm really dreading to 
have to figure out some other way of handling these types of things... single 
file distributions are very nice even if they are actually multiple files all 
stored in the executable ;)



More information about the fpc-pascal mailing list