Differences between Dialects

The X# compiler can run in different dialects. The table below shows the differences between these dialects.
You can use the /dialect compiler option to select the dialect that you prefer to use. The Core dialect is default.

 

Feature

Core

VO 1,2

Vulcan 1,2

Harbour 1,2

Xbase++
14

FoxPro

4 Letter abbreviations of keywords

(FUNC, WHIL etc).

No

Yes 11

No

Yes 11

Follow the
conventions of Xbase++

Yes 11

&& as single line comment character (alternative syntax for //)

No

Yes

No

Yes

Yes

Yes

* at beginning of line as comment character

Yes

Yes

Yes

Yes

Yes

Yes

ALIAS (->) operator

No

Yes

Yes

Yes

Yes

Yes

AND, NOT, OR, XOR as alternatives for .AND., .NOT. etc

No

No

No

No

No

Yes

ARRAY type, Including Array literals & NULL_ARRAY, including missing elements

No

Yes

Yes

Yes

Yes

Yes

BREAK statement

No

Yes

Yes

Yes

Yes

Yes

BEGIN SEQUENCE .. RECOVER .. END SEQUENCE

No

Yes

Yes

Yes

Yes

Yes

CLIPPER calling convention (requires USUAL support)

No

Yes

Yes

Yes

Yes

Yes

CODEBLOCK type

No

Yes

Yes

Yes

Yes

Yes

DATE type, including NULL_DATE

No

Yes

Yes

Yes

Yes

Yes

DATE and DateTime literals

Yes

Yes

Yes

Yes

Yes

Yes

DEFINE statement with optional type clause

Yes

Yes

Yes

Yes

Yes

Yes

FIELD statement, and recognition of Field names in stead of locals or instance variables

No

Yes

Yes

Yes

Yes

Yes

FLOAT type, including Float literals & the /vo14 compiler option

No

Yes

Yes

Yes

Yes

Yes

GLOBAL statement

Yes

Yes

Yes

Yes

Yes

Yes

IIF() expression and the /vo10 compiler option 7

Yes Yes Yes Yes Yes Yes

Late binding (with /lb+)

No

Yes 

 

Yes

Yes

Yes

MACRO compiler

No 13

Yes

Yes

Yes

Yes

Yes

MEMVAR, PUBLIC, PRIVATE, PARAMETERS statement , including undeclared variables 14

No

 Yes

No

Yes

Yes

Yes

PSZ Type, including NULL_PSZ and (pseudo) PSZ conversion functions (String2Psz(), Cast2Psz()

No

Yes

 Yes

Yes

Yes

Yes

PSZ Indexer

n/a

1-based

0-based

1-based

1-based

1-based

NULL_STRING 9

Yes

Yes

Yes

Yes

Yes

Yes

SYMBOL type, including Symbol literals & NULL_SYMBOL

No

Yes

Yes

Yes

Yes

Yes

USUAL type, including NIL literal

No

Yes

Yes

Yes

Yes

Yes 15

TEXT Command

No

No

No

No

No

Yes

Special features

     

 

 

 

Untyped Literal Arrays 8

No

Yes

Yes

Yes

Yes

Yes

Missing types allowed 3

No

Yes

Yes

Yes

Yes

Yes

Missing arguments in function/method calls MyFunc(1,,2)

No

Yes

Yes

Yes

Yes

Yes

Pseudo functions

     

 

 

 

 PCount(), _GetMParam(), _GetFParam(), _Args() 4

No

Yes

Yes

Yes

Yes

Yes

 SLen() 5

No

Yes

Yes

Yes

Yes

Yes

_Chr()

No

Yes

Yes

Yes

Yes

Yes

 AltD() 6

No

Yes

Yes

Yes

Yes

Yes

 PCall, PCallNative

No

Yes

Yes

Yes

Yes

Yes

 CCall, CCallNative

No

Yes

Yes

Yes

Yes

Yes

Other information

           

Generated Function class name

Functions
X$<ModuleName>$Functions
for static functions and globals

<AssemblyName>.Functions (DLLs)
<AssemblyName>.Exe.Functions (EXEs)
<AssemblyName>.Exe.$<ModuleName>$.Functions
for static functions and globals

 

VOSTRUCT and AS/IS syntax

No 10

Yes

Yes

No 10

No 10

No 10

UNION and AS/IS syntax

No 10

Yes

Yes

No 10

No 10

No 10

  1. Requires VulcanRT.DLL or XSharp.VO.DLL
  2. Requires VulcanRTFuncs.DLL or XSharp.VO.DLL
  3. Missing types get translated to USUAL. With the new /vo15 compiler option you can tell the compiler that you do not want to allow missing types
  4. Only supported inside functions and methods with Clipper Calling convention
  5. The Vulcan runtime does not have a SLen() function. The compiler translates this to accessing the Length property of the string
  6. This gets translated to
         IF System.Diagnostics.Debugger.Attached
                           Diagnostics.Debugger.Break()
         ENDIF
  7. In the core dialect, each of the expressions is cast to OBJECT. In the other dialects the expression is cast to USUAL.
  8. Untyped literal arrays in the VO/Vulcan dialect are translated to the VO Array type:
    {"aa", "bb", "cc"}
    Typed literal arrays are prefixed with <Type> like this:
    <STRING>{"aa", "bb", "cc"}
    This becomes a literal string array
  9. With the /vo2 compiler option NULL_STRING is compiled to an empty string. Otherwise to a NULL.
  10. The VOSTRUCT and UNION can be replaced with a standard .NET structure. For Union you need to use the [StructLayout(LayoutKind.Explicit)] attribute on the structure, and the [FieldOffSet()] attribute on each field, to explicitly define the location of the fields.
  11. Only for VO compatible keywords, not for keywords introduced in Vulcan or XSharp.
  12. The true and false expressions for an IIF() are optional in Harbour and XBase++
  13. The macro compiler is not supported. However, when you use the RDD system in the Core dialect, the index expression will still use the macro compiler, and a reference to the XSharp.RT.DLL is needed for the support of the macro compiler.
  14. This requires the XSharp runtime.
  15. In FoxPro, NIL is not allowed, and redefined to FALSE.

 


No comments