Am Tuesday 14 August 2012 10:17:52 schrieb Sven Barth: > Am 14.08.2012 09:11, schrieb Rainer Stratmann: > > No need for tons od additional identyfiers and additional lines like: > > > > var > > p_snippet1 : pchar; > > p_snippet2 : pchar; > > p_snippet3 : pchar; > > > > const > > id_snippet1 = 'ids_snippet1'; > > id_snippet2 = 'ids_snippet2'; > > id_snippet3 = 'ids_snippet3'; > > > > p_snippet1 := trlt( id_snippet1 ); > > p_snippet2 := trlt( id_snippet2 ); > > p_snippet3 := trlt( id_snippet3 ); > > > > writeln( p_snippet1 ); > > writeln( p_snippet2 ); > > writeln( p_snippet3 ); > > > > My solution: > > > > writeln( ls( 'snippet1' ) ); > > writeln( ls( 'snippet2' ) ); > > writeln( ls( 'snippet3' ) ); > > You are exaggerating the standard solution a bit... which would be:
It was more or less exactly the way I did it before with little exaggerating as you notice :-) Even now I save 50% codesize in comparison to resourcestring. > resourcestring > snippet1 = 'snippet1'; > snippet2 = 'snippet2'; > snippet3 = 'snippet3'; > > Writeln(snippet1); > Writeln(snippet2); > Writeln(snippet3); _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal