1.2.32 $X or $EXTENDEDSYNTAX : Extended syntax

Extended syntax allows you to drop the result of a function. This means that you can use a function call as if it were a procedure. By default this feature is on. You can switch it o using the f$X-g or f$EXTENDEDSYNTAX OFFgdirective.

The following, for instance, will not compile:

function Func (var Arg : sometype) : longint;  
begin  
...          { declaration of Func }  
end;  
 
...  
 
{$X-}  
Func (A);

The reason this construct is supported is that you may wish to call a function for certain side-eects it has, but you don't need the function result. In this case you don't need to assign the function result, saving you an extra variable.

The command line compiler switch -Sa1 has the same eect as the f$X+g directive.

By default, extended syntax is assumed.