Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the purpose of {.$DEFINE VAR} instead of {$DEFINE VAR} in Delphi

What is the difference in Delphi between using {.$DEFINE VAR} and {$DEFINE VAR} compiler directives ?

like image 827
aleroot Avatar asked Dec 07 '22 08:12

aleroot


2 Answers

The code originally had a {$DEFINE VAR} statement in it, then a period was added to turn the statement into a plain ordinary comment without removing the statement, presumably so it can be restored at a later time.

{$...} is a precompiler directive.

{...} that does not start with {$ is a comment.

like image 98
Remy Lebeau Avatar answered Dec 08 '22 21:12

Remy Lebeau


Think of the first one as a commented version (one that the compiler will ignore) of the second one.

like image 33
Z.D. Avatar answered Dec 08 '22 20:12

Z.D.