Show/Hide Toolbars

XSharp

X# uses the following Workarea operators:

 

Operator

Example

Meaning

->

Customer->LastName
FIELD->FirstName
_FIELD->Salary
M->Name
A->City

Field "LastName" in the "Customer" workarea
Field "FirstName" in the current workarea
Field "Salary" in the current workarea
The dynamic memory variable "Name" (public or private)
The field City in workarea 1.
Allowed single letter aliases are A .. J.
 
Note that FIELD and _FIELD are synonyms.
Keywords that appear directly after the -> operator are seen as identifier and not keyword.

. (Dot)

Customer.LastName
 
 
 

In the VFP dialect we also support the DOT (".") syntax for aliased operations.
Please note that this is ambiguous because the compiler cannot detect at compile time if CUSTOMER is a workarea or for example a MEMVAR. If there is a local variable with the name CUSTOMER then this will access the LASTNAME property of the CUSTOMER local variable.

In all other cases this will produce code that looks for either a CUSTOMER workarea or memory variable at runtime.
Keywords that appear directly after the "." operator are seen as identifier and not keyword.

. (Dot)

M.Name

In the VFP dialect we also support the DOT (".") syntax for memvar access. This is also ambiguous because NAME can be both a local variable or a dynamic memory variable "NAME" (public or private). However the compiler will be able to detect the local variable at compile time and when this is not found then it will access the dynamic memory variable.