Show/Hide Toolbars

XSharp

Specifies whether to allow named arguments in the parser or not.

Syntax

-namedargs [+ | -]  

Arguments

+ | - Specifying +, or just -namedargs, directs the compiler to allow namedarguments. Specifying - directs the compiler to NOT use named arguments

 

Remarks

The default = + for the Core dialect and - for all other dialects. So -namedargs- only is useful in combination with the Core dialect.

Note If you enable this option then quite often existing code such as the code below will produce compiler errors>
That is why we have disabled named arguments for most dialects.

FUNCTION Start as VOID
LOCAL a AS ARRAY
-/ When named arguments are enabled then the compiler will complain that there is no parameter named "a" for the Empty function
IF !Empty( a := SomeFunctionThatReturnsAnArray())  
-/ do something
ENDIF
RETURN

Click here to see the property page