[fpc-devel] Silly syntax games
Hans-Peter Diettrich
DrDiettrich at compuserve.de
Fri Jun 10 13:11:02 CEST 2005
L505 wrote:
> {$define {:= begin} //this works
> {$define }:= end. } //this doesn't work
> {$define }:= end; } //this doesn't work
Are you sure that the first example really works? It might do somehting
unexpected, even if the compiler doesn't complain.
The problem with "{" and "}" is the conflict between these characters as
delimiters of comments (the whole directive), and their use as
identifiers inside the directives.
As soon as you've redefined the meaning of "{" in the first line, it
most probably becomes impossible to add any further compiler directive,
because these start with exactly that redefined character!
DoDi
More information about the fpc-devel
mailing list