Show/Hide Toolbars

XSharp

The compiler and runtime have the following "special" behavior when compiling for any or the non-core dialects

Compiler

Allows "garbage" after keywords such as NEXT, ENDDO etc.

Does not allows the DOT ('.') operator to call Instance methods

Requires a reference to the XSharp.Core and XSharp.RT DLLs

String Comparisons are mapped to a function in the XSharp runtime

NULL_STRING is compiled into either "" or NULL depending on the compiler option -vo2

Supports literal symbols (#SomeName)

The String "=" operator is mapped to a function in the XSharp runtime

The X# specific types such as DATE, ARRAY, SYMBOL, FLOAT and USUAL are not supported, but required a reference to the runtime

Adds support for Dynamic Memory Variables and Undeclared variables

Single quotes are used for String literals (except in Vulcan). Character literals must be prefixed with a c, like this: cChar := c'A'

Allow the use of ASend() to call methods for each element inside a X# array.

The '=' operator may be used for assigns but will generate a warning when used.

Adds support for BEGIN SEQUENCE .. END SEQUENCE

Adds support for the ALIAS (->) operator

Adds support for the FIELD statement

Adds support for the Macro compiler and &(variable) syntax

Adds support for the ARRAY OF <type> syntax

The compiler generated functions class is called
       <AssemblyName>.Functions (DLLs) for functions and globals
       <AssemblyName>.Exe.Functions (EXEs) for functions and globals

 <AssemblyName>.Exe.$<ModuleName>$.Functions  for static functions and globals

The compiler adds several attributes (defined in XSharp.Core) to describe the default namespace and compiler version

The compiler generates code for EXE files that set several properties in the Runtimestate to match compiler options and the dialect of the main app.

Procedures cannot return values

Adds support for untyped variables and return values

Adds support for untyped function and method parameters (the so-called Clipper calling convention)

Adds support for late bound code (requires the -lb compiler option)

Adds support for INIT and EXIT procedures

Adds support for Codeblocks (untyped Lambda expressions with an array of USUAL parameters and a USUAL return value)

Allows skipping arguments in method calls. Skipped arguments are assumed to be NIL

Runtime

The default RDD all except the FoxPro dialect is DBFNTX