Am Monday 06 August 2012 22:37:08 schrieb Aleksa Todorovic: > program test_str_36; > > uses > sysutils; > > function s(str: pchar): pchar; > var > str2: pchar; > begin > if str[0] = '~' then > begin > // string is not localized > str2 := strnew('numero'); // localized version > ppchar(str)^ := str2; > end; > result := ppchar(str)^; > end; > > var > i: integer; const prestr = '~~~~~~~~'; > begin > for i := 1 to 10 do > begin > writeln( s( prestr + 'number' ), ' ' , i); > end; > end.
That seems somehow interesting. But you have to put it everywhere in front. May be a macro can do it so that you have only s() left. And may be (but not very likely when reading the statement of Jonas) you can search the whole program for '~~~~~~~~' to get the caller adresses of s(). _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal