Show/Hide Toolbars

XSharp Bandol

Changes in 2.0.8 (Bandol GA 2.08)


The compiler had a problem with the "return" attribute target

Errors inside the "statementblock" rule are now better detected and the compiler will no longer report many errors after these for correct lines of code.

Fixed a problem with Casts to logic

Fixed a problem with undeclared variables used as counter for For Loops

Improved the code generation for FIELDs, MEMVARs and undeclared variables for prefix operation, postfix operations and assignments.

Improved the code generation for method calls where the parameter is a ref or out variable when default parameters are involved. The compiler now generates extra temporary variables for these calls.

In the dialects where this relevant the compiler now also supports ENDFOR as alias for NEXT and FOR EACH as alias for FOREACH.

Added support for the DO <proc> [WITH arguments] syntax


The DbCreate() function now creates a unique alias when the base filename of the file to create is already opened as an alias

The Numeric overflow checking for USUAL values now follows the overflow checks of the main app

DbUnLock() now accepts an (optional) record number as parameter

XMLGetChild() was throwing an exception when no elements were found

XMLGetChildren() was throwing an exception

Fixed a problem in 2 rules inside "dbcmds.xh"

The XSharpDefs.xh  file now automatically includes "dbcmd.xh"

Some datatype errors were reported incorrectly.

The "NoMethod" method for late bound code was called with incorrect parameters. This has been fixed.

Fixed some problems with translating usuals with a NIL value to string or object.

In Xbase++ the Set() function also accepts strings with the value "ON" or "OFF" for logical settings. We are now allowing this too.

Set(_SET_AUTOORDER) now accepts a numeric second parameter just like in VO (Vulcan was using a Logic parameter)

We have added some support classes to the FoxPro class hierarchy for the FoxPro class support (Abstract, Custom and Collection). More classes will follow later.

Fixed a problem with transform and "@ez" picture.


Fixed a problem in the SQLSelect class when re-opening a cursor.

RDD System

Fixed a problem reading Advantage MEMO fields

Improved the error messages when an index cannot be opened due to an index expression with an error (for example a missing function)

We have added the option to install an event handler in the RDD system. See the topic Workarea Events for more information.

Skip, Gobottom and other workarea operations that change the current record will no longer set EOF to FALSE for workareas with 0 records.

Clearing the scope in an Advantage workarea would throw an exception when there was no scope set. This has been fixed.

Unlocking a record in an Advantage workarea would throw an exception when there was no record locked. This has been fixed.

DbSetRelation() was not working correctly. This has been fixed.

VS Integration

Fixed a problem with the code generation for DbServer and FieldSpec entities

Added support for the Import and Export buttons in the DbServer Editor

Improved entity parsing inside the editor in the Xbase++ dialect.

The VS Parser was not colorizing the UDC tokens (including ENDFOR) unless the source file had preprocessor tokens itself. This has been fixed.

Improved block detection for new END keywords.

The VS Integration now recognized the class syntax for VFP type classes.

Fixed a problem in the code that was checking to see which project system "owns" the PRG extension.

Added compiler option to the Project Property pages to suppress generating a default Win32 manifest.


VOXPorter was ignoring entities that were not properly prototyped in VO. This has been fixed

FoxPro dialect

We have added a compiler option /fox1 that controls the class hierarchy for objects. With /fox1 enabled (the default in the FoxPro dialect) all classes must inherit from the Custom class. The code generation for properties stores the values for properties in a collection inside the Custom class. With /fox1- properties will be generated as "auto" properties with a backing field.

We have added support for FoxPro classes. See the topic FoxPro class syntax for more information about what works and what doesn't work.

We have added support for DIMENSION and DECLARE statements (which create a MEMVAR initialized with an array)

Changes in 2.0.7 (Bandol GA 2.07)

Possible breaking change

We have removed the #define CRLF from the standard header file. There is a DEFINE CRLF in XSharp.Core now. If you are compiling against Vulcan and you are seeing an error about a missing CRLF then you may want to add the following to your code:
DEFINE CRLF := e”\r\n”


UDCs that were resulting in an empty list of tokens were triggering a compiler error in the preprocessor. This has been fixed.

Calling a method on an array would be translated to a ASend() with the method name as parameter when the method does not exist in the underlying array class.
The compiler will generate a warning now when this happens,.

The compiler was producing incorrect code for (USUAL) casts. This has been fixed. In rare cases this may produce a compilation error. If that happens to you then simply create a usual by calling the USUAL constructor:  USUAL{somevalue}

Fixed several problems with methods declared outside of a CLASS .. END CLASS

In the FoxPro dialect NOT, AND, OR and XOR are now allowed as alternate syntax for .NOT.,.AND., .OR. and .XOR.

In the FoxPro dialect you can now include statements before the first entity in the file. The compiler will recognize these and will automatically create a function with the name of the source file and will add the code in these statements a body of this function.

The compiler now allows to cast an integer expression to logic when /vo7 is enabled. The LOGIC(_CAST is always supported for expressions of type integer

Incorrect use of language features (such as using a VOSTRUCT in the Core or FoxPro dialect) is now detected earlier by the compiler leading to somewhat faster compile times for incorrect code.

The compiler now also initialized multi dimensional string arrays with an empty string when /vo2 is enabled, like in the code below:
CLASS TestClass

In previous builds you could not set breakpoints on the source code line with a SELF() or SUPER() call if this line was immediately after the CONSTRUCTOR(). This has been fixed.

When a project contains "_DLL METHOD", "_DLL ASSIGN" or "_DLL ACCESS" (after exporting from VO) then the compiler will now generate a more meaningful errormessage.

The compiler will no longer produce hundreds of the same error messages when a source file contains many of the same error. After 10 errors per source file the compiler will only report unique error numbers. So if your source code has 20 different error messages then you will still see 20 errors reported, but if your source contains the same error type 100 times then the list will be truncated after 10 errors.

The compiler no longer allows code behind end tokens such as ENDIF or NEXT. The standard header file 'XSharpDefs.xh' now includes rules that will eliminate these tokens.


The ++ and -- operators for the usualtype were not working for Date and Datetime values

FErase() and FRename() now set FError() to 2 when the source file does not exist

The File() function was throwing an exception for paths with invalid characters. It now returns FALSE and sets the Ferror()

Several specific numbers were producing incorrect Str() results. This has been fixed.

The case of the name of the Value property for several types was changed from Value to VALUE. This caused problems for people that were interfacing with X# code from C# code. The original case has been restored. This change has been reversed.

Under certain situations the error stack would not contain the complete list of frames. This has been fixed.

The size of the Close and Copy buttons of the Error Dialog has been enlarged so there is more space for translated strings

The Pad..() functions were returning a padded version of "NIL" for NIL values. This was not compatible with Xbase++. They now return a string with all spaces. Btw: VO throw an exception when you call Pad..() with a NIL value.

Fixed a problem with the PadC() function for values > 1 character.

We have changed the Val() function to be more compatible with Visual Objects

The runtime contained a second overload for the Space() function that accepted an Int parameter. This was causing problems in the macro compiler. This overload has been removed. You may have to change your code because of that.

Fixed a problem in EnforceType() and EmptyUsual() with the STRING type

AEval and AEvalOld() now both pass the array index as second parameter to the codeblock that is evaluated

RDD System

Fixed a problem that EOF and BOF were not both set to true when opening an empty DBF with an index

Fixed a problem with DbSeek() and Found() for DBFNTX and DBFCDX

The DBF class was not properly decoding field names and/or index expressions that contain Ascii characters > 127 (field names like STRAßE)

File dates were updated when a dbf was closed even when nothing was changed. This has been fixed.

The runtime now contains code that closes all open workareas at shutdown. This should help to prevent DBF or index corruption.

The Advantage RDD was automatically doing a GoTop after the index order was changed. This no longer happens.

The Advantage RDD now retries opening DBF and Index files a couple of times before failing.

Fixed a small incompatibility between DBFCDX and AXDBFCDX

VS Integration

The Core Classlibrary template had a typo in a file name which caused it not to be loaded correctly

The code generator for the Windows Forms editor was duplicating USING statements. This has been fixed. Duplicate using statements will be deleted when a form is opened and saved in the designer.

The compilation messages on the output window for the compile time and the number of warnings and errors is now only shown for the build verbosity normal and higher. The warnings and errors message is also shown for lower build verbosity if there are compiler errors.

The project system will no longer update the version number in the project file if the project file was created with build 2.0.1 or later.

Fixed a problem with setting and clearing the "Specific version" property for Assembly References.

The default templates for the VO compatible editors are now installed in the XSharp\Templates folder and the editor uses this location as 'fallback' when you don't have templates in your project

The Properties folder is now placed as first child in the tree of a Project, and the VO Binaries items are placed before resource items in the list of children of a source item in the tree.


VOXPorter now prefixes Debug tokens with @@

VOXPorter now removes INSTANCE declaration for properties that are also declared as ACCESS/ASSIGN

VOXPorter now adds spaces between variable names that are delimited with .AND. or .OR.. So "a.and.b" becomes "a .and. b"


We have "lifted" some of the documentation of the Visual Objects runtime functions and added these to our runtime documentation. This is 'work in progress', some topics will need some extra work.

Changes in (Bandol GA 2.06)


We received a request to keep the version numbering simpler. For that reason this new build is called Bandol 2.06 and the file versions for this build are also 2.06. The assembly versions for the runtime assemblies are all 2.0, and we intend to keep those stable as long as possible, so you will not be forced to recompile code that depends on the runtime assemblies.

Several fixes that were meant to be included in were not included in that build. This has been corrected in 2.0 6.0


A missing ENDTEXT keyword now produces an error XS9086

Unbalanced textmerge delimiters produce a warning XS9085

The TEXT keyword in the FoxPro dialect is now only recognized when it is the first non whitespace token on a line. As a result of this you can use tokens like <text> in Preprocessor commands again.

The VO cast operations on literal strings no longer produce a compiler warning about possible memory leaks.



Runtime errors in late bound code were always shown as TargetInvocationException. The true cause of the error was hidden that way. We are now unpacking the error and rethrowing the original error, including the callstack that was leading to that error

Some texts in the string resources were updated

Calling the Str() function with a -1 value for length and/or decimals produced results that were not compatible with VO. This was fixed.

Fixed a problem with DBZap() and files with a DBT memo.

In some situations EOF and BOF were not set to TRUE when opening an empty DBF file. This has been fixed.

PSZ values with an incorrect internal pointer are now displayed as "<Invalid PSZ>(..)"


RDD System

The code to read and write to columns in an Advantage workarea now uses separate column objects, just like the code for the DBF RDD. This makes the code a bit easier to understand and should make the code a bit faster.


VS Integration

The text block between TEXT and ENDTEXT is now displayed in the same color as literal strings

The VO compatible Project Item templates no longer automatically add references to your project

Project files from version 2.01.0 and later will no longer be "touched" when opening with this version of the X# project system, since there have been no changes to the project file format since that build.



The CATCH block in the generated Start function now calls ErrorDialog() to show the errors. This uses the new language resources to display the full error with VO compatible error information (Gencode, Subcode etc)

Changes in (Bandol GA 2.01)


Blank lines after an END PROPERTY could confuse the compiler. This has been fixed

The TEXT .. ENDTEXT command has been implemented in the compiler (FoxPro dialect only)

The \ and \\ commands have been implemented (FoxPro dialect only)

Procedures in the FoxPro dialect may now return values. Also the /vo9 options is now enabled by default in the FoxPro dialect. The default return value for a FUNCTION and PROCEDURE is now TRUE in the foxpro dialect and NIL in the other dialects.

Error messages no longer refer to Xbase types by their internal names (XSharp.__Usual) but by their normal name (USUAL).


Creating classes with a namespace prefix was not working. This has been fixed.


Fixed a problem with ArrayNew() and multiple dimensions

When calling constructor of the Array class with a number the elements were already initialized. This was not compatible with Vulcan.NET. There is now an extra constructor whtich takes a logical parameter lFill which can be used to automatically fill the array

The text for the ERROR_STACK language resource has been updated

Calling Str() with integer numbers was returning a slightly different result from VO. This has been fixed.

Added support functions for TEXT .. ENDTEXT and TextMerge and an output text file.

Fixed a problem in the DTOC() function

You can now add multiple ImplicitNamespace attributes to an assembly

We have added several FoxPro system variables (only _TEXT does something at this moment)


Zap and Pack operations were not properly setting the DBF file size

An Append() in shared mode was not properly setting the RecCount

Opening a file with one of the Advantage SQL RDDs was not working. This has been fixed.

Writing DateTime.Minvalue to a DBF would not write an empty date but the date 1.1.1 This has been fixed.


Fixed a problem in ListView:EnsureVisible().

Some questionable casts (such as the one that cause the previous problem) have been cleaned up

Visual Studio Integration

Parameter tips for constructor calls were off by one parameter. This has been fixed.

When looking for types, the XSharp namespace is now the first namespace that is searched.

Changes in (Bandol GA)


Fix a problem in assignment expressions where the Left side is an aliased expression with a workarea in parentheses:
(nArea)->LastName := AnotherArea->LastName

Multiline statements, such as FOR blocks, no longer generate Multiline breakpoints in the debugger.

Fixed a problem where blank lines or lines with 'inactive' preprocessor comments after a class definition would generate a compiler error.

Errors for implicit conversions between INT/DWORD and PTR now produce a better error message when they are not supported.

USUAL.ToObject() could not be called with the latebinding compiler option was enabled. This has been fixed.

Fixed an internal compiler error with untyped STATIC LOCALs.

Fixed a problem with aliased expressions.

Indexing PSZ values is no longer affected by the /az compiler option


Fixed a problem with some aliased expressions

The macro compiler now detects that you are overriding a built-in function in your own code and will no longer throw an "ambigous method" exception but will choose function from your code over functions defined in the X# runtime


FIxed several problems in the Directory() function

Fixed problem with indexing PSZ values

Added StackTrace property on the Error object so also errors caught in a BEGIN SEQUENCE will have stack information.

Fixed problems with "special" float values and ToString(), such as NaN, PositiveInfinity

Fixed a problem with RddSetDefault() with a null parameter

DbInfo(DBI_RDD_LIST) was not returning a value. This has been fixed.

We have updated many of the language resources, Also the Error:ToString() now uses the language resources for captions like 'Arguments' and 'Description'.

Low level file errors now include the callstack

Fixed some problems in AsHexString()

The DosErrString() no longer gets its messages from the language string tables. The messages have been removed and also the related members in the XSharp.VOErrors enum.

Added a Turkish language resource.

RDD System

Fix locking problem in FPT files

Fixed several problems with OrdKeyCount() and filters, scopes and SetDeleted() setting

Some DBF files have a value in the Decimals byte for field definitions for field types that do not support decimals. This was causing problems. These decimals are now ignored.

Opening and closing a DBF without making changes was updating the time stamp. This has been fixed.

Fixed problems in Pack() and Zap()

Fixed a problem where custom indexes were accidentally updated.

Fixed several problems with OrdKeyCount() in combination with Filters, SetDeleted() and scopes.

VO SDK Classes

Most of the libraries now compile with "Late Binding" disabled for better performance.
To help in doing this some typed properties have been added such as SqlStatement:__Connection which is typed as SQLConnection.

Visual Studio integration

Fixed a problem in the Brace matching code

Improved Brace matching for keywords. Several BEGIN .. END constructs have now been included as well as CASE statements inside DO CASE and SWITCH, RECOVER, FINALLY, ELSE, ELSEIF and OTHERWISE

Fix a problem with adding and deleting references when unloaded or unavailable references existed.


The program is now able to comment, uncomment and delete source code lines from the VO code when exporting to XSharp.
You have to add comments at the end of the line. The following comments are supported:

         // VXP-COM : comments the line when exporting it
         // VXP-UNC : uncomments the line
         // VXP-DEL : deletes the line contents
         // METHOD ThisMethodDoesNotGetDefinedInVOcode() // VXP-UNC
         // RETURN NIL // VXP-UNC

Changes in (Bandol RC3)


Code generation for STATIC LOCALs of type STRING was not initializing the variables to an empty string when /vo2 was selected. We have also improved code generation for STATIC LOCALs when they are initialized with a compile time constant

In preparation for the support for variables passed by reference to functions/methods with clipper calling convention we are now assigning back the locals variables to the parameter array at the end of a function/method with clipper calling convention.

The compiler would not complain if you were assigning a value of one enum to a variable of another enum. This has been fixed.

Added support for the FoxPro '=' assignment operators. Other dialects also allow the assignment operator but a warning is generated in the other dialects.

Xbase++ classes inside BEGIN NAMESPACE .. END NAMESPACE were not recognized. This has been fixed.

Statements inside WITH blocks are no longer constrained to assignment expressions and method calls. You can now use the WITH syntax for expressions anywhere inside a WITH block. If the compiler can't find the WITH variable then it will output a new error message (XS9082)

Updated the Aliased Expression rules to make sure that compound expressions properly respect the parentheses.

The __DEBUG__ macro was not always set correctly. We have changed the algorithm that sets this macro. When the DEBUG define is set then this macro gets defined. When the NDEBUG define is set then this macro is not defined. When both defines are absent then __DEBUG__ is NOT set.

The compiler was allowing you to use the '+' operator between variables/ expressions of type string and logic. This is now flagged as an error.


Fixed a problem with resolving Field names that were identical to keywords or keyword abbreviations (for example DATE and CODE) and for Field names that are equal to built-in function names (such as SET)

Fixed a problem where a complicated expression evaluated with an alias prefix was not evaluated correctly.

The macro compiler initializes itself from the Dialect option in the runtime to enable/disable certain behavior.

The macro compiler now recognizes the "." operator for workarea access and memvar access when running in the FoxPro dialect.


Added functions FieldPutBytes() and FieldGetBytes()

Added function ShowArray()

Added several defines that were missing, such as MAX_ALLOC and ASC_A.

Added Crypt() overloads that accept BYTE[] arguments

The ClassDescribe() method for DataObject classes (XPP dialect) now includes properties and methods that were dynamically added.

Fixed a problem with the RELEASE command for MemVars. This was also releasing variables defined outside the current function / method.

There is now also a difference between the FoxPro dialect and other dialects in the behavior of the RELEASE command.
FoxPro completely deletes the variables, the other dialect set the value of the variables to NIL.

New PRIVATE memvars are initialized to FALSE in the FoxPro dialect. In the other dialects they are initialized to NIL.

Some numeric properties in the RuntimeState were giving a problem when a numeric of one type was written and another numeric type was expected when reading. This has been fixed.

Fixed a problem with return NIL values from Macro compiled codeblocks.

The parameter to DbClearScope() is now optional

The USUAL type now allows to compare between values of type PTR and LONG/INT64 The PTR value is converted to the appropriate Integral type and then an Integral comparison is done.

The USUAL type now also allows comparisons between any type and NIL.

Casts from USUAL values to SHORT, WORD, BYTE and SBYTE are no longer checked to be compatible with VO.

RDD System

Added support for different block sizes in DBFFPT.

DBFFPT now allows to override the block size (when creating) from the users code. Please note that block sizes < 32 bytes prevent the FPT from opening in Visual FoxPro.

Added support for reading various Flexfile memo field types, including arrays.

Added support for writing to FPT files

When creating FPT files we now also write the FlexFile header. Please note that our FPT driver does not support "record recycling" for deleted blocks like FlexFile does. We also only support writing STRING values to FPT files and Byte[] values.

Added support for Visual FoxPro created CDX files that were created with the COLLATE option. The RDD dll now contains collation tables for all possible combinations of collation and CodePage.

Added support for USUALs with a NIL value and the comparison operators (>, >=, <, <=). These operators return FALSE, except the >= and <= operators which return TRUE when both sides of the comparison are NIL.

We exposed several Advantage related function and types. Also the function AdsConnect60() was defined. We have not created functions for all available functions in Ace32 and Ace64, but only the ones needed in the RDD.

If you are missing a function in the ACE class, please let us know. All functions should be available and accessible now in the Ace32 and Ace64 classes or in the ACEUNPUB32 or ACEUNPUB64 classes.

The ADS RDD was returning incorrect values for LOGIC fields.

Fixed some problems with skipping in CDX indexes and scopes and filters.

Executing DbGoTop() twice or DbGoBottom() twice for DBFCDX would confuse the RDD. This has been fixed.

Fixed a problem with Seeking() in an empty DBF file

FieldPut for STRING fields in the Advantage RDD now truncates the fields to the maximum length of the field before assigning the value

Fixed a problem with UNIQUE CDX Indexes.

You can now create VFP compatible DBF files with DBCreate(). To do so use the following field types (apart from the normal CDLMN):

W        Blob
Y        Currency
B        Double
T        DateTime
F        Float
G        General
I        Integer
P        Picture
Q        Varbinary
V        Varchar

Special field flags can be indicated by adding a suffix to the type:

"0" = Nullable
"B" = Binary
"+" = AutoIncrement

So this creates a nullable date: "D0" and this creates an autoincremental integer "I+".

Auto increment columns are initialized with a counter that starts with 1 and a step size of 1. You can change that by calling DbFieldInfo:

                 DbFieldInfo(DBS_COUNTER, 1, 100) // sets the counter for field 1 to 100
                       DbFieldInfo(DBS_STEP, 1, 2)          // sets the step size for field 1 to 2

Fixed a locking problem with FPT files opened in shared mode

Fixed several problems related to OrderKeyCount() and various settings of Scopes and SetDeleted()  in the DBFCDX RDD.

VO SDK Classes

Fixed a problem in the DateTimePicker class when assigning only a time value.

System classes and RDD classes have been cleaned up somewhat and now compile in AnyCPU mode. So this means that you can use the DbServer class in a 64 bit program !
The projects for these two libraries also no longer have the "Late Binding" compiler option enabled. There is still some late bound code in these libraries but this code now uses explicit late bound calls such as Send(), IVarGet() and IVarPut().

Because of the change in the handling of __DEBUG__ some SDK assemblies are not better optimized.

Visual Studio integration

Added support for WITH .. END WITH blocks in the editor

When generating Native Resources (RC files) the BuildSystem now sets a #define __VERSION__. This will have the fileversion number of the XSharp.Build.DLL without the dots. ( will be written as "2100")

The XSharp help item in the VS Help menu now opens the local Help (CHM) file

Fixed a problem in the WCF service template

Correction to the multi line indenting for code that uses attributes

Code generation for new Event handlers now includes a RETURN statement, even when VS does not add one to the statement list

The intellisense option "Show completionlist after every character" has been disabled since it was having a negative impact on performance and would also insert keywords with @@ characters in front of them.

Several changes to the code parsing for the Windows Forms editor. Comments and Regions should now be saved and regenerated as well as attributes on classes. Also code generation for images from project resources has been fixed as well as parsing of static fields and enumerators declared in the same assembly.
Please note. If you are using values from types defined in the same assembly as the form then the assembly needs to be (re)compiled first before the form can be successfully opened in the Windows Forms Editor.

New methods generated from the Windows forms editors will now be generated with a closing RETURN statement.

We have made some improvements to the presentation of QuickInfo in the source code editor.


VOXporter now also exports VERSIONINFO resources

Changes in (Bandol RC 2)


File wide PUBLIC declarations (for MEMVARs) were incorrectly parsed as GLOBALs. Therefore they were initialized with NIL and not with FALSE. They are now generated correctly as public Memvars. The creation of the memvars and the initialization is done in after the Init3 procedures in the assembly have run.

Instance variable initializers now can refer other fields and are allowed to use the SELF keyword. This is still not recommended. The order in which fields are initialized is the order in which they are found in the source code. So make sure the field initializers are defined in the right order in your code.

AUTO properties are now also initialized with an empty string when /vo2 is enabled.

The compiler was allowing you to define instance variables for Interfaces. They were ignored during code generation. Now an error message is produced when the compiler detects fields on interfaces.

When the compiler detects 2 ambiguous symbols with different types (for example a LOCAL and a CLASS with the same name) then the error message now clearly indicates the type for each of these symbols.

Fixed an exception in the Preprocessor

Added support for the FoxPro runtime DLL.

The ANY keyword (an alias for USUAL) is no longer supported.

Keywords that appear after a COLON (":") DOT (".") or ALIAS (->) operator are no longer parsed as keyword but as identifier. This should solve issues with parsing code that for example accesses the Date property of a DateTime class.

We have added support for the WITH .. END WITH statement block:
LOCAL oPerson as Person
oPerson := Person{}
WITH oPerson
  :FirstName := "John"
  :LastName := "Doe"
You can also use the DOT (.) as prefix for the names. The only expressions allowed inside WITH .. ENDWITH are assignments and method calls (like you can see above)

Added support for the FoxPro LPARAMETERS statement. Please not that a function or procedure can only have a PARAMETERS keyword OR a LPARAMETERS keyword OR declared parameters (names between parentheses on the FUNCTION/PROCEDURE line)

Added support for the FoxPro THIS keyword and .NULL. keyword

We have added support for the FoxPro Date Literal format {^2019-06-21} and FoxPro DateTime Literals {^2019-06-21 23:59:59}.

Date literals and DateTime literals are now also supported in the Core dialect. Date Literals will be represented as DateTime values in the Core dialect.

The standard header file xsharpdefs.xh now conditionally includes header files for the Xbase++ dialect and FoxPro dialect. These header files do not have much content at this moment, but that will change in the coming months.

When the compiler detects that some header files are included but that the defines in these header files are also available as constants in references assemblies then a warning will be generated and the include file will be skipped (XS9081)

The compiler now supports an implicit function _ARGS(). This will be resolved to the arguments array that is passed to functions/methods with clipper calling convention. This can be used to pass all the arguments of a function/method to another function/method.

We have added the TEXT ... ENDTEXT command for the FoxPro dialect. The string inbetween the TEXT and ENDTEXT lines is passed to a special runtime function __TextSupport that will receive 5 parameters: the string, the merge, NoShow, Flags and Pretext arguments. You will have to define this function yourself for now. it will be included in the XSharp Foxpro runtime in a future version.

We have added support for END keywords for all entity types that did not have one yet. The new end keywords are optional. They are listed in the table below. The FoxPro ENDPROC and ENDFUNC keywords will be mapped to END PROCEDURE and END FUNCTION with a UDC.





















The compiler now registers the Dialect of the main in the Dialect property of the RuntimeState (Non Core dialects only)


Fixed a problem with escaped literal strings

Fixed a problem with implicit narrowing conversions

Fixed a problem with macro compiled alias operations  (Customer)->&fieldName


Fixed a problem in the Round() function.

Fixed a problem in the ExecName() function.

Added FoxPro runtime DLL.

Added XML support functions in the Xbase++ dialect runtime

Added support for dynamic class creation in the Xbase++ dialect runtime.

Fixed a problem in the Push-Pop workarea code for aliased expressions.

converting a NULL to a symbol would cause an exception. This has been fixed.

RDD system

Fixed several problems in the ADS RDD

The DBFCDX RDD is now included

The DBFVFP RDD is now included. This RDD can be used to access files with DBF/FPT/CDX extension and support the Visual Foxpro field types, such as Integer, Double, DateTime and VarChar. Reading files should be fully supported. Writing should also work with the exception of the Picture and General formats and with the exception of the AutoIncremental Integer fields. You can also use the RDD to open the various "definition" files from VFP such as projects, forms and reports. The RDD 'knows' about the different extensions for indexes and memos. You can also open DBC files as normal tables. In a future version we will support the VFP database functionality.

Visual Studio Integration

You can now specify that multi line statements should indent on the 2nd and subsequent lines.

Type lookup for functions inside a BEGIN NAMESPACE .. END NAMESPACE did not include the types in this namespace.

Started intellisense for INLINE methods in the Xbase++ dialect

Fixed several problems in intellisense

Improved intellisense for VAR keywords declared in a FOREACH loop

Several other (smaller) improvements.


VOXporter now writes DEFINES in the RC files and no longer literal values.

VOXporter: fix for module names with invalid chars for filenames


Changes in (Bandol RC 1)


Added support for the so called IF Pattern Expression syntax, which consists of an IS test and an assignment to a variable, prefixed with the VAR keyword:
IF x is Foo VAR oFoo
  ? oFoo:DoSomething()
The variable oFoo introduced in the expression will only be visible inside the IF statement.
Of course you can also use the pattern on other places, such as ELSEIF blocks, CASE statements, WHILE expressions etc:
IF x is Foo VAR oFoo
  ? oFoo:DoSomething()
ELSEIF x is Bar VAR oBar
  ? oBar:DoSomethingElse()

Fixed a problem with method modifiers and generic methods

Fixed a problem with partial classes with different casing and destructors

Fixed a problem with Interfaces and methods with CLIPPER calling convention

The compiler now generates an error (9077) when an ACCESS or ASSIGN method has Type Parameters and/or Constraint clauses

Fixed a problem with DEFINEs with specific binary numeric values. Also overflow checking is now always of when calculating the result of numeric operations for the values of a DEFINE.

When a constant value was added or subtracted to a numeric value < 32 bits then the result was seen as 32 bits by the compiler. This sometimes forced you to use casts in your code. With this change that cast is no longer necessary.

The compiler allowed you to concatenate non string values and strings and was automatically calling ToString() on the non strings. This is no longer possible. The compiler now generates an error (9078)when it detects this.

We have added error trapping code to the compiler that should route internal errors to compiler error XS9999. If you see such an error, please let us know.

DIM arrays of literal strings are now initialized properly.

There was a problem when switching between dialects when using the shared compiler. It would sometimes no longer detect dialect specific keywords. This has been fixed.

Fixed a problem where incorrect code was producing an error "Failure to emit assembly"

Fixed a problem in code that uses _CAST to cast a 32 bits value to 16 bits

Fixed a problem with overloaded indexed properties where the index parameter in a subclass has a different type than the index parameter in the super class.

Changed implementation of several aliased operations (ALIAS->FIELD and (ALIAS)->(Expression))

Changed preprocessor handling of extended strings ( (<token>) )

The Roslyn code was not marking some variables as 'assigned but not read' to be compatible with the old C# compiler. We are now flagging these assignments with a warning. This may produce a lot of warnings in your code that were not detected before.
To support this we have received some requests to "open up" the support for 1 based indexes in the compiler. In the past the compiler would only allow 1 based indexing for variables of type System.Array or of the XBase ARRAY Type.
We have now added a couple of interfaces to the runtime. If your type implements one of these interfaces then the compiler will recognize this and allow you to use 1 based indexes in your code and then the compiler will automatically subtract 1 from the numeric index parameter. The XSharp ARRAY type and ARRAY OF type now also implement (one of) these interfaces/
The interfaces are:
  INTERFACE IIndexedProperties
  INTERFACE INamedIndexer


Fixed some problems in the OrderInfo() function

Fixed several problems with DB..() functions in the runtime

Fixed several problems with the macro compiler

Fixed a problem with the handling of default parameters in late bound calls to methods

Improved error messages for missing methods and/or properties in late bound code.

The Select() function was changing the current workarea. This has been fixed.

Converting a USUAL to a STRING was not throwing the same exceptions as VO. It was always calling ToString() on the USUAL. Now the behavior is the same as in VO.

F_ERROR has been defined as a PTR now and no longer as numeric

CreateInstance can now also find classes defined in namespaces

Fix problems with missing parameters in late bound code. Also added (limited) support for calling overloaded methods and constructors in late bound code.

Fixed problems with TransForm(), and several of the Str() functions.

XSharp.Core is now fully compiled as Safe code.

Fixed a problem with late bound assigns and access

NIL<-> STRING comparisons are now compatible with Visual Objects

Fixed problem with AEval() and missing parameters

Added Set() function. Please be careful when using header files for _SET defines. There are subtle differences between the definitions in Harbour, Xbase++ and VO/Vulcan.
We recommend NOT to use the defines from the header file but to use the defines that are defined inside the X# runtime DLLs

Changed implementation of the functions used by the compiler for Aliased operations

RDD system

Added support for DBF character fields up to 64K.

Implemented the DBFCDX RDD

Fixed several problems related to the DBFNTX RDD

The DBF RDD was using the incorrect locking scheme for Ansi DBF files. It now uses the same scheme as VO and Vulcan.

Macro compiled index expressions are not of the type _CodeBlock and not of the type RuntimeCodeBlock (the RuntimeCodeblock is encapsulated inside the _CodeBlock object).
That prevents problems when storing these expressions inside a USUAL

Visual Studio integration

Fixed an exception that could occur when typing a VAR expression

When the project system makes a backup of a project file, we are now making sure that Readonly flags are cleared before writing to or deleting existing files.

Reading intellisense data from C++ projects could send the intellisense engine into an infinite loop. This has been fixed.

The changes to the Form.Designer.prg are now written to disk immediately, to make sure that changes to the form are recompiled if you press 'Run' or 'Debug' from the window of the form editor

Improved support for intellisense for the VAR keyword.

Added support for FoxPro on the Project Properties page to prepare for the Compiler and Runtime changes for FoxPro.

.CH files are now also recognized as "X#" files in Visual Studio.

You can now control the characters that select an entry from a Completion List. For example the DOT and COLON now also select the current selected element. The complete list can be found on the Tools-Options-TextEditor-XSharp-Intellisense page.

Assemblies added to a project would not be properly resolved until the next time the project was loaded. This has been fixed.

Fixed a problem in the codedom parser which feeds the windows form editor. You can now inherit a form from another form in the same assembly. You will have to compile the project first (of course).

The .CH extension is now also registered as relevant for the X# project system.

Changed auto indentation for #ifdef commands

Fixed an exception that could occur during loading of project files with COM references.

Added templates for class libraries in XPP and VO Dialect

Sometimes a type lookup for intellisense was triggered inside a comments region. This has been fixed.


VOXPorter was not removing calling conventions when creating delegates. This has been fixed

VOXporter was sometimes generating project files with many duplicates of resource items. This has been fixed.

VOXporter now marks prefix identifiers that conflict with one of the new keywords with "@@"

The delay for the VOXporter welcome screen has been shortened.

Changes in (Bandol Beta 9)


The Lexer (the part of the compiler that recognizes keywords, literals etc) has been rewritten and is slightly faster.

The compiler now supports digit separators for numeric literals. So you can now write 1 million as:

Fixed problem where static local variables were not initialized with "" even when compiler option -vo2 was selected

#ifdef commands using preprocessor macros such as __XSHARP_RT__ were not working correctly.

The XBase++ dialect now also supports the 'normal' class syntax.

We had changed the 'Entrypoint' algorithm in Beta 8. This has been restored now and the -main command line option now works again as well. In stead the "body" of the Start method is now encapsulated in an anonymous function.

Duplicate include files no longer produce an error but a warning

Fix for problem with default parameter values with 'L' or 'U' suffix

Added compiler error when specifying default parameter values for methods/functions with clipper calling convention

DIM arrays of STRING were not initialized with "" when /vo2 was specified. This has been fixed.

Added support for Dbase style memory variables (MEMVAR, PUBLIC, PRIVATE, PARAMETERS). See the MEMVAR topic in the help file for more information. This is only available for certain dialects and also requires the /memvar commandline option

Added support for undeclared variables (this is NOT recommended!). This is only available for certain dialects and requires the /memvar AND the /undeclared commandline options

Fixed a problem for comparisons between USUAL variables and STRING variables

Fixed a problem with partial classes where the classname had different casing in the various declarations

Fixed a problem with numeric default parameters with L or U suffixes

Fixed a problem with line continuation semi colons followed by a single line comment with the multiline comments style.

Fixed a problem with methods containing YIELD statements in combination with compiler option /vo9

When a visibility modifier was missing on a generic method then this method was created as a private method. This has been fixed.

When choosing between overloaded functions in XSharp.RT and XSharp.Core the function in the XSharp.RT assembly would sometimes be chosen although the overload in XSharp.Core was better

CASE statements without CASE block but only a OTHERWISE block would crash the compiler. This has been fixed and an warning about an empty CASE statement has been added.


Several changes to the Macro compiler, such as the parsing of Hex literals, case sensitivity of parameters (they are no longer case sensitive) and limited support for function overloading.

Several missing functions have been added, such as _Quit(),

The return value of several Ord..() functions was incorrect. This has been fixed.

Fixed a problem with CurDir() for the root directory of a drive

Fixed a problem with calling Send() with a single parameter with the value NULL_OBJECT.

Solved problem with incorrect parameters for DiskFree() and DiskSpace()

MemoRead() and MemoWrit() and FRead..() and FWrite..() now respect the SetAnsi() setting like the functions in the VO Runtime.

We have added 2 new functions to read/write binary files: MemoReadBinary() and MemoWritBinary()

Not all DBOI_ enum values had the same value as in Vulcan. This has been solved.

SetDecimalSep() and SetThousandSep() now also set the numeric separators in the current culture.

The USUAL -> STRING conversion now calls AsString()

Added support for Dbase style dynamic memory variables (MEMVAR, PUBLIC, PRIVATE, PARAMETERS). See the Memory Variables topic in the help file for more information.

The IsDate() function now also returns TRUE for USUALs of type DateTIme. There is also a separate IsDateTime() function. We have also added IsFractional() (FLOAT or DECIMAL) and IsInteger (LONG or INT64) and IsInt64()

Added missing Cargo slot to the Error class. Also improved Error:ToString()

Fix for problem in W2String()

And many more small changes.

Visual Studio Integration

We have added a new tab page in the Project Properties dialog: Dialect. This contains dialect specific language options.

2 options from the Build options page (which is configuration dependent) have been moved to the Language page (which is build INdepedent), because that makes more sense:

Include Path


We have also added a project property on the Language page to specify an alternative standard header file (in stead of XSharpDefs.xh)

The XSharp.__Array type was shown in the intellisense with the wrong name

We have added entries on the Project Properties dialog pages to enable MEMVAR support and to enable Undeclared variables

Fixed a problem in the CodeDom provider (used by the Windows Form editor) where fields with array types were losing their array brackets when writing back to the source.

When writing changes from the windows form editor we are no longer writing to disk but to the opened (sometimes invisible) windows of the .designer.prg. This should prevent warning messages about the .designer.prg file that was changed outside Visual Studio

Fixed a problem parsing source code where identifier names were starting with '@@'

The Debugger was showing UINT64 as typename for ARRAYs. This has been fixed.

Renaming forms in the Windows Forms editor was not working for forms with a separate .designer.prg. This has been fixed.

Fixed a (very old) problem where the OutPutPath property in the xsproj file was sometimes set to $(OutputPath).

Fixed an exception in the editor for empty source files or header files.

Fixed an exception when the error list was created for errors without errorcode

Commenting a single line in the editor will now always use the // comment format


No changes in this release.

Changes in (Bandol Beta 8)


The compiler source code has been upgraded to Roslyn 2.10 (C# 7.3). As a result of that there are some new compiler options, such as /refout and we also support the combination of the "PRIVATE PROTECTED" modifier that defines a type member as accessible for subclasses in the same assembly but not for subclasses in other assemblies

We have added support for XBase++ class declarations. See the XBase++ class declaration topic for more information about the syntax and what is supported and what not.

We have added support for simple macros with the &Identifier syntax

We have added support for late bound property access:

oThe <Expression>:&<Identifier> syntax.
This translates to IVarGet(<Expression>, <Identifier>).

oThe <Expression>:&(<Expression2>) syntax.
This translates to IVarGet(<Expression>, <Expression2>).

oBoth of these can also be used for assignments and will be translated to IVarPut:
<Expression>:&<Identifier> := <Value>
This becomes IVarPut(<Expression>, <Identifier>, <Value>)

oAll of these will work even when Late Binding is not enabled.

We have added a new compiler options /stddefs that allows you to change the standard header file (which defaults to XSharpDefs.xh)

We have added a new preprocessor Match marker <#idMarker> which matches a single token (all characters until the first whitespace character)

When you select a dialect now, then the compiler will automatically add some compiler macros. The VO dialect declares the macro __VO__, the Vulcan dialect declares the macro __VULCAN__ the harbour dialect declares the macro __HARBOUR__ and the XBase++ dialect declares the macro __XPP__.

When compiling against the X# runtime then also the macro __XSHARP_RT__ will be defined.

We have added a new warning when you pass a parameter without 'ref' modifier (or @ prefix) to a method or function that expects a parameter by reference or an out parameter.

We have also added a warning that will be shown when you assign a value from a larger integral type into a smaller integral type to warn you about possible overflow problems.


This build includes a new faster macro compiler. It should be fully compatible with the VO macro compiler. Some of the .Net features are not available yet in the macro compiler.

We moved most of the generic XBase code to XSharp.RT.DLL. XSharp.VO.DLL now only has VO specific code. We have also added XSharp.XPP.DLL for XPP

Fix Ansi2OEM problem with FRead3(), FWrite3() and FReadStr

Added  missing functions EnableLBOptimizations() and property Array:Count

Fixed problem with latebound assign with CodeBlock values

Fixed problem with AScan() and AEval() with missing parameters

Changed error return codes for DirChange(), DirMake() and DirRemove()

Send() was "swallowing" errors. This has been fixed

Fixed a problem with assigning to multi dimensional arrays

Fixed a problem with creating objects with CreateInstance() where objects are not in the "global" namespace

Fixed several problems in the RDD system and support functions.

Fixed several problems in the late binding support, such as IsMethod, IsAccess, IVarPut, IVarPutSelf etc.

Fixed several problems with TransForm()

Integer divisions for usuals containing integers now return either integers or else fractional numbers depending on the compiler setting of the main app.

We fixed several conversions problems during late bound calls

We have fixed several problems with the Val() and Str() functions.

The internal type names for DATE and FLOAT have been changed to __Date and __Float. If you rely on these type names please check your code !

DebOut32 was not outputting data to the debug terminal if the runtime was compiled in release mode. This has been fixed.

Visual Studio Integration

Fixed filtering on 'current project' in the error list

Type lookup for local variables was sometimes failing. This has been fixed

Fixed a problem with Brace Matching that could cause an exception in VS

Fixed a problem with Tooltips that could cause an exception in VS

Fixed a problem with uncommenting that could cause an exception in VS

New references added in VS would not always be included in the type search in the editor. This has been fixed.

Member prototypes for constructors now include the type name and curly braces

We have started work on improved code completion for variables declared with VAR

We have started with support for code completion for members of Generic types. This is not finished yet.

PRG files that are not part of a X# project and not part of a Vulcan project are now also colorized in the editor.


VulcanXPorter was always adjusting the referenced VO libraries and  was ignoring the "Use X# Runtime" checkbox

VOXPorter now has an option to copy the resources referenced in the AEF files to the Resources subfolder in the project

VOXPorter now also copies the cavowed, cavofed and cavoded template files to the properties folders in your project.

Changes in (Bandol Beta 7)


When calling a runtime function with a USUAL parameter the compiler now automatically prefers methods or functions with "traditional' VO types over the ones with enhanced .Net types. For example when there are 2 overloads, one that takes a byte[] and another that takes a string, then the overload that takes a string will get preference over the overload that takes a byte[].

Resolved a problem with .NOT. expressions inside IIF() expressions

Improved debugger break point generation for Invoke expressions ( like String.Compare())

Fixed a pre-processor error for parameters for macros defined in a #define. These parameters must have the right case now. Parameters with a different case will not be resolved any longer.

Fixed a pre-processor error where optional match patterns in pre-processor rules were repeated. This is too complicated to explain here in detail <g>.

The code generated by the compiler for Array operations now uses the new interfaces declared in the X# runtime (see below).


We have added several missing functions, such as _GetCmdLine, Oem2AnsiA() and XSharpLoadLibrary

Fixed problems in CreateInstance, IVarGet, IVarPut(), CtoDAnsi() and more.

Added VO Compatible overload for FRead4()

No longer (cathed) exceptions are produced for empty dates

Ferror() was not always return the error of a file operation. This has been fixed

We have added a new FException() function that returns the last exception that occurred for a low level file operation

Casting a usual containing a PTR to a LONG or DWORD is now supported

Some new interfaces have been added related to array handling. The compiler no longer inserts a cast to Array inside the code, but inserts a cast to one of these interfaces depending on the type of the index parameter. The USUAL type implements IIndexer and IIndexProperties and dispatches the call to the objects inside the usual when this objects exposes the interface. This is used for indexed access of properties when using AEval or AScan on an ARRAY OF <type>




SDK Classes

We have added the Hybrid UI classes from Paul Piko (with permission from Paul)


The Vulcan XPorter now also has an option to replace the runtime and SDK references with references to the X# runtime

Changes in (Bandol Beta 6)


The compiler was sometimes still generating warnings for unused variables generated by the compiler. This has been fixed.

The compiler will now produce a warning that #pragmas are not supported yet (9006)

Added compiler macro __FUNCTION__ that returns the current function/method name in original casing.

Literal sub arrays for multidimensional arrays no longer need a type prefix when compiling in the Core dialect

Fixed problem with the Global class name that would happen when building the runtime assemblies (these have a special convention for the global class names)

When the calling convention of a method in an interface is different from the calling convention of the implementation (CLIPPER vs Not CLIPPER) then a new error (9067) will be generated by the compiler.

The calling convention for _DLL functions and procedures is now optional and defaults to PASCAL (stdcall)

The namespace alias for using statements was not working in all cases.

The compiler will now generate an error for code that incorrectly uses the VIRTUAL and OVERRIDE modifiers.

The compiler was throwing an exception for a specific kind of incorrect local variable initializer with generic arguments. This has been fixed.

Visibility modifiers on GET or SET accessors for properties were not working correctly (INTERNAL, PRIVATE etc). This has been fixed.

The compiler now handles PSZ(_CAST,...) and PSZ(..) differently. When the argument is a literal string, then the PSZ will only be allocated once and stored in a "PSZ Table" in your assembly. The lifetime of this PSZ is then the lifetime of your app. When this happens then the new compiler warning XS9068 will be shown.
When the argument is a string stored in a local or global (or define) then the compiler can't know the lifetime of the PSZ. It will therefore allocate the memory for the PSZ with the StringAlloc() function. This ensures that the PSZ will not go out of scope and be freed. If you use this a lot in your application then you may be repeatedly allocating memory. We recommend that you avoid the use of the cast and conversion operators for PSZs and take control of the lifetime of the PSZ variables by allocating and freeing the PSZ manually. PSZ casts on non strings (numerics or pointers) simply call the PSZ constructor that takes an intptr (this is used on several spots in the Win32API library for 'special' PSZ values).

Named arguments are now also supported in the Vulcan dialect. This may lead to compiler errors if your code looks like the code below, because the compiler will think that aValue is a named argument of the Empty() function.
IF Empty(aValue := SomeExpression())

If you were inheriting a static class from another class then you would get a compiler warning before. This is now a compiler error, because this had a side effect where the resulting assembly contained a corrupted reference.

The overload resolution code now chooses a type method/function over a method/function with clipper calling convention.

The XBase++ dialect is now recognized by the compiler. For the time being it behaves the same as Harbour. We have also added the compiler macro __DIALECT_XBASEPP__ that will be automatically define to TRUE when compiling in Xbase++ mode.

Fixed a problem in the PDB line number generation that would cause incorrect line numbers in the debugger

Visual Studio integration

The source code editor was not always showing the correct 'active' region for #defines defined in #include files.

Opening a source file without entities (e.g. a header file) could result in an error message inside VS.

Fixed a null reference exception in the editor

Fixed a problem when un-commenting code in the editor

Improved load time performance for large solutions with many dependencies.

Fixed a problem where the intellisense engine could lock a DLL that was used by a project reference or assembly reference.

Fixed a problem where missing references (for example COM references that were not installed on the developers machine) could cause problems with the type lookup when opening forms in the windows forms editor.

Added an option to select the Harbour dialect on the project properties page.

The Build System

The Build system did not recognize that begin NAMESPACE lines in source code were commented out. This has been fixed.


We have added an option to sort the entities in alphabetical order in the output file.

We have added an option so you can choose to add the X# Runtime as reference to your application (otherwise the Vulcan runtime is used)


The SetCentury setting was incorrect after calling SetInternational(#Windows). This has been fixed.

The Descend function for dates now returns a number just like in VO

The functions ChrA and AscA have been renamed to Chr() and Asc() and the original functions Chr() and Asc() have been removed. The original functions were using the DOS (Oem) codepage and this is not compatible with Visual Objects.

On several places in the runtime characters were converted from 8 bit to 16 bit using the System.Encoding.Default codepage. This has been changed. We use the codepage that matches the WinCodePage in the Runtimestate now. So by setting the Windows codepage in the runtime state you now also control the conversions from Unicode to Ansi and back

The Oem2Ansi conversion was incorrect for some low level file functions.

We have changed several things in the Late Binding support

All String - PSZ routines (String2PSz(), StringAlloc() etc) now use the Windows Codepage to convert the unicode strings to ansi.

If you library is compiled with 'Compatible String comparisons' but the main app isn't, then the string comparisons in the library will follow the same rules as the main app because the main app registers the /vo13  setting with the runtime. The "compatible" stringcomparison routines in the runtime now detect that the main app does not want to do VO compatible string comparisons and will simply call the normal .Net comparison routines.
We therefore recommend that 3rd party products always use the Compatible String comparisons in their code.

Preliminary documentation for the runtime was generated from source code comments and has been included as chapter in this documentation.


This build includes the first version of the VO SDK compiled against the X# runtime. We have included the following class libraries


oSystem Classes

oRDD Classes

oSQL Classes

oGUI Classes

oInternet Classes

oConsole Classes

oReport Classes

All assemblies are named VO<Name>.DLL and the classes in these assemblies are in the VO namespace.

This SDK is based on the VO 2.8 SP3 source code. The differences between VO 2.8 SP3 and VO 2.8 SP4 will be merged in the source later,

The Libraries for OLE, OleServer and Internet Server are not included. The OleAutoObject class and its support classes is included in the XSharp.VO library. OleControl and OleObject are not included.

Preliminary documentation for these classes was generated from source code comments and has been included as chapter in this documentation.

The RDD system

This build includes the first version of the RDD system. DBF-DBT is ready now. Other RDDs will follow in the next builds. Also most of the RDD related functions are working in this build.

This build also includes the first version of the Advantage RDD. With this RDD you can access DBF/DBT/NTX files , DBF/FPT/CDX files and ADT/ADM/ADI files. The RDD names are the same as the RDD names for Vulcan. (AXDBFCDX, AXDBFNTX, ADSADT). We also support the AXDBFVFP format and the AXSQLCDX, AXSQLNTX, AXSQLVFP. For more information about the differences and possibilities of these RDD look in the Advantage documentation.
We have coded the Advantage RDD on top of the Advantage Client Engine. Our RDD system detects if you are running in x86 or x64 mode and calls functions in Ace32 or Ace64 accordingly.
To use Advantage you copy the support DLLs from an Advantage Vulcan RDD to the folder of your application. Look at the Advantage docs for Vulcan to see the list of the DLLs. The Advantage RDD is part of the standard XSharp.RDD.DLL which therefore replaces the AdvantageRDD.Dll for Vulcan.

The XSharp.Core DLL now also has RDD support. We have chosen NOT to implement this in functions, but as static methods inside the CoreDb class. Old code that uses the VoDb..() functions can be simply ported by changing "VoDb" to "CoreDb."
The parameters and return values that are USUAL in VO and Vulcan are implemented as OBJECT in the CoreDb class.
The ..Info() methods have 2 overloads. One that takes an Object and one that takes a reference to an object.
The methods inside CoreDb return success or failure with a logical value like the VODB..() functions in VO. If you want to know what the error was during the last operation then you can access that with the method CoreDb._ErrInfoPtr() . This returns the last exception that occurred in a RDD operation.

At this moment the CoreDb class only has a FieldGet() that returns an object. We will add some extra methods that return values in a specified type in the next build (such as FieldGetString(), FieldGetBytes() etc). We will also add overloads for FieldPut() that take different parameter types.

The XSharp.VO DLL has the VoDb..() functions and the higher level functions such as DbAppend(), EOF(), DbSkip() etc.
The VoDb..() functions return success or failure with a logical value. If you want to know what the error was during the last operation then you can access that with the method _VoDbErrInfoPtr() . This returns the last exception that occurred in a RDD operation.

You can mix calls to the VoDb..() functions and CoreDb...() methods. Under the hood the VoDb..() functions also call the CoreDb methods.

The higher level functions may throw an exception just like in VO. For example when you call them on a workarea where no table is opened. Some functions simply return an empty value (like Dbf(), Recno()). Others will throw an exception. When you have registered an error handler with ErrorBlock() then this error handler will be called with the error object. Otherwise the system will throw an exception.

Date values are returned by the RDD system in a DbDate structure, Float values are returned in a DbFloat structure. These structures have no implicit conversion methods. They do however implement IDate and IFloat and they can and will be converted to the Date and Float types when they are stored in a USUAL inside the XSharp.VO DLL. The DbDate structure is simply a combination of a year, month and date. The DbFloat structure holds the value of fields in a Real8, combined with length and the number of decimals.

More documentation about the RDD system will follow later. Of course you can also look at the help file and source code on GitHub.

Changes in (Bandol Beta 5)


The strong named key for assemblies with native resources was invalid. This has been fixed

When an include file was included twice for the same source (PRG) file then a large number of compiler warnings for duplicate #defines would be generated. Especially when the Vulcan VOWin32APILibrary.vh was included twice then over 15000 compiler warnings would be generated per source file where this happened. This large number of warnings could lead to excessive memory usage by the compiler. We are now outputting a compilation error when we detect that the same file was included twice. We have also added a limit of 500 preprocessor errors per source (PRG) file.

A change in Beta 4 could result in compiler warnings about unused variables that were introduced automatically by the X# compiler. This warning will no longer be generated.

The compiler now correctly stores some compiler options in the runtime state of XSharp.


Fixed a problem in the Ansi2OEM and OEM2Ansi functions.

Fixed a problem in the sorting for SetCollation(#Windows)

Fixed a problem with string comparisons in runtime functions like ASort(). This now also respects the new runtime property CompilerOptionVO13 to control the sorting

Visual Studio integration

The sorting of the members in the editor dropdown for members was on methodname and propertyname and did not include the typename. When a source file contained more than one type then the members would be mixed in the members dropdown

Build System

The default value for VO15 has been changed back from false to undefined.

Changes in (Bandol Beta 4)


POSSIBLY BREAKING CHANGE: Functions now always take precedence over same named methods. If you want to call a method inside the same class you need to either prefix it with the typename (for static methods) or with the SELF: prefix. If there is no conflicting function name then you can still call the method with just its name. We recommend to prefix the method calls to make your code easier to read.

The compiler was accepting just an identifier without a INSTANCE, EXPORT or other prefix and without a type inside a class declaration. It would create a public field of type USUAL. That is no longer possible.

Improved the positional keyword detection algorithm (this also affects the source code editor)

The || operator now maps to the logical or  (a .OR. b) and not to the binary or (_OR(a,b))

The VAR statement now also correctly parses
VAR x = SomeFunction()

And will compile this with a warning that you should use the assignment operator (:=).
We have added this because many people (including we) copy examples from VB and C# where the operator is a single equals token.

Error messages about conflicting types now include the fully qualified type name.

The compiler no longer includes the width for literal Floats. This is compatible with VO.

A Default parameter of type Enum is now allowed.


Added several functions that were missing, such as __Str() and DoEvents()

Fixed a problem in the macro compiler with non-english culctures.

Added several overloads for Is..() functions that take a PSZ instead of a string, such as IsAlpha() and IsUpper().

Added some missing error defines, such as E_DEFAULT and E_RETRY.

Fix for a problem with SubStr() and a negative argument

Fix for a problem with IsInstanceOf()

Fix for a problem with Val() and a hex value with an embedded 'E' character

Added implicit conversions from ARRAY to OBJECT[] and back.

Several changes to the code for Transform() and Unformat() to cover several exotic picture formats

Changes to the code for SetCentury() to automatically also adjust the date format (SetDateFormat())

Fixes for the Str() family of functions in combination with SetFixed() and SetDigitFixed().

Visual Studio integration

Fixed a problem when building projects in the latest build of Visual Studio

Several 'keywords' were not case synchronized before, such as TRUE, FALSE, NULL_STRING etc,

Keywords are not case synchronized on the current line as long as the user has the cursor on them or immediately after them. That means that when you type String and want to continue to change it to StringComparer then the formatter will no longer kick in and change "String" to the keyword case before you have the chance to complete the word.

The Control Order dialog inside the form editor was not saving its changes.

Added an option to include all entities from the editor, or just the members from the current selected type in the right dropdown of the editor

The editor was also matching braces inside literal strings and comments. This has been fixed.

Fixed a problem with the CodeDom parser where extended strings (strings containing CRLF tokens or other special tokens) were parsed incorrectly. This resulted in problems in the windows forms editor.

The member resolution code in the editor was not following the same logic as the compiler: When a function and a method with the same name exist it was resolving to the method in stead of the function. This has been fixed.

Fixed a problem when debugging in X64 mode.

Fixed an exception when comparing source code files with SCC integration.

Fixed several problems w.r.t. the XAML editor:

oCode is now generated with STRICT calling convention to avoid problems when compiler option "Impliciting CLIPPER calling convention" is enabled

oWPF and other templates now include STRICT calling convention for the same reason

oThe XAML editor could not properly load the current DLL or EXE and had therefore problems resolving namespaces and adding user controls to the tool palette. This has been fixed.

We have added an option to the Tools/Editor/XSharp/Intellisense options that allow you to control how the member combobox in the editor works. You can choose to only show methods & properties of the current type or all entities in the right combobox. The left combobox always shows all types in the file.

Some of the project and item templates have been updated. Methods and constructors without parameters now have a STRICT calling convention. Also the compiler option /vo15 has been explicitly disabled in templates for the Core dialect.

Changes in (Bandol Beta 3)


When 2 method overloads have matching prototypes the compiler now prefers the non generic one over the generic one

Fixed an exception that could occur when compiling a single line of source code with a preprocessor command in it.


Added Mod() function

Added ArrayNew() overload with no parameters

Fixed problem in __StringNotEquals() when length(RHS) > length(LHS) and SetExact() == FALSE

Added missing string resource for USUAL overflow errors

Visual Studio integration

Improved keyword case synchronization and indenting. Also a source file is 'Keyword Case' synchronized when opened.

Opening a source file by double clicking the find results window no longer opens a new window for the same source file

Improved type lookup speed for intellisense

Fixed a problem that would prevent type lookup for types in the same namespace

Fix for QuickInfo problem introduced in the latest Visual Studio 2017 builds

QuickInfo tips are no longer shown in the debugger where they were overlapping with debugger tooltips

The comboboxes with methods and functions in the editor window no longer shows parameter names and full type names. Now it shows the shortened type names for the parameters

These same comboboxes now show the file name for methods and properties defined in another source file

Fixed problem in the window editor with generating code for tab pages

Vulcan XPorter

Project dependencies defined in the solution file were not properly converted

VO XPorter

Fixed a problem where resource names were replaced with the value of a define

Changes in (Bandol Beta 2)


The compiler now transparently accepts both Int and Dword parameters for XBase Array indices

When the compiler finds a weakly typed function in XSharp.VO and a strongly typed version in XSharp.Core then it will choose the strongly typed version in XSharp.Core now.

In the VO and Vulcan dialect sometimes an (incorrect) warning 'duplicate usings' was displayed. This is now suppressed.

The debugger information for the Start function has been improved to avoid unnecessary step back to line 1 at the end of the code

The debugger break point information for BEGIN LOCK and BEGIN SCOPE has been improved

The debugger break point information for multi line properties has been improved

/vo6, /vo7 and /vo11 are now only supported in the VO/Vulcan dialect


Removed DWORD overloads for Array indexers

Fixed overload problem for ErrString()

Fixed overload problem for _DebOut()

Fixed problems in DTOC() and Date:ToString()

Fixed ASort() incompatibilities with VO

Fixed memory blocks now get filled with 0xFF when they are released to help detect problems

Visual Studio

Fix 'Hang' in VS2017 when building

Fix 'Hang' in VS2017 when a tooltip (QuickInfo) was displayed

Fixed problem with debugging x64 apps

You can no longer rename or delete the Properties folder

Selecting 'Open' from the context menu on the the Properties folder now opens the project properties screen

Updated several icons in the Project Tree

Enhancements in the Goto Definition

Build System

Fix problem with CRLF in embedded resource commandline option

Changes in (Bandol Beta 1)


New features

Added support for ARRAY OF language construct. See the Runtime chapter  for more information about this.

Added support for the X# Runtime assemblies when compiling in the VO or Vulcan dialects.

Added support for the "Pseudo" function ARGCOUNT() that returns the # of declared parameters in a function/method compiled with clipper calling convention.

Added a new warning number for assigning values to a foreach local variable. Assigning to USING and FIXED locals will generate an error.


Optimized the code generation for Clipper calling convention functions/methods

The /cf and /norun compiler options are no longer supported

The preprocessor no longer strips white space. This should result in better error messages when compiling code that uses the preprocessor.

Some parser errors are now more descriptive

Changed the method that is used to determine if we compile against CLR2 or CLR4. The compiler checks at the location either system.dll or mscorlib.dll. When this location is in a path that contains "v2", "2.", "v3" or "3." then we assume we are compiling for CLR2. A path that contains "V4" or "4." is considered CLR4. The /clr commandline option for the compiler is NOT supported.

The preprocessor now generates an error when it detects recursive #include files.

Bug fixes

Fixed a problem when using the [CallerMemberAttribute] on parameters when compiling in Vulcan or VO Dialect

Abstract properties should no longer generate a warning about a body

You can now correctly use ENUM values as array indexes.

Fixed a problem for Properties with PUBLIC GET and PRIVATE SET accessors.

Fixed an issue where assigning an Interface to a USUAL required a cast to Object

Fixed an issue where IIF expressions with literal types were returning the wrong type (the L or U suffix was ignored)

Fixed an issue where the declaration LOCAL x[10] was not compiled correctly. This now compiles into a local VO Array with 10 elements.

Visual Studio Integration

Build 1.2.1 introduced a problem that could cause output files to be locked by the intellisense engine. This has been fixed

The editor parser had problems with nested types. This has been fixed

Enum members were not included in code completion for enums inside X# projects

Some improvements in the code reformatting

Added option on the Tools/Options for the editor to include keywords in the "All tokens" completion list

Fixed a problem where assemblies that could not be loaded to retrieve meta information would be retried 'for ever'

Fixed a problem with retrieving type information from assemblies that contained both managed and unmanaged code.

Added some properties for referenced assemblies to the IDE Properties window

Fixed a problem with assembly references and the Windows Forms editor, introduced in one of the latest Visual Studio 2017 updates

When enabling XML output on the Project Properties window an incorrect filename was shown for assemblies that contain a '.'in the assembly name.

The editor parser now has better support for parameters of type REF and OUT

Added support for 'Embed Interop Types' in the property windows for Assembly References and COM references

Fixed a problem where the codemodel was sometimes locking output DLLs for Project references

Build System

Fixed a problem with the naming of the XML documentation file.


Added XSharp.Core.DLL, XSharp.VO.DLL and XSharp.Macrocompiler.DLL.
Most runtime functions are implemented and supported. See the X# Runtime chapter for more information

VO XPorter

SDK related options have been removed. They will be moved to a new tool later.

Changes in 1.2.1


Fixed a problem where a compilation error resulted in the message "Failed to emit module" without further information

Fixed a problem with ++, -- += and similar operations in aliased expressions (like CUSTOMER->CUSTNO++)

Constructor initializers and Collection initializers were not working after a constructor with parameters. That has been fixed.

Fixed an issue with negative literal values stored in a USUAL when overflow checking was enabled.

For the CATCH clause now both the ID and the TypeName are optional. This means that there are 4 variations.
You can only have one catch clause without type, since this defaults to the System.Exception type. However, you can have many catch clauses without ID.

  CATCH ID AS ExceptionType
  CATCH ID                 // defaults to Exception type
  CATCH AS ExceptionType  
  CATCH           // defaults to Exception type

Visual Studio Integration

Improved the speed of the background code scanning

Improved the speed of the background parser inside the editor

Fixed a problem in the codedom provider that is used by the windows forms editor

Changes in 1.2.0


You can now pass NULL for parameters declared by reference for compatibility with VO & Vulcan.
We STRONGLY advise not to do this, unless you make sure that the function expects this and does not assign to the reference parameter without checking for a NULL reference first. This will only work when the /vo7 compiler option is enabled.

We have made some optimizations in the Lexer. The compiler should be a little faster because of that

We fixed a problem with the automatic constructor generation (/vo16) for classes that inherit from classes defined in an external DLL

When compiling with /vo2 any string fields assigned in a child class before the super constructor was called would be overwritten with an empty string. The generated code will now only assign an empty string when the string is NULL.
Note: we do not recommend to assign parent fields in the child constructor before calling the super constructor. Manually coded default values for parent fields will still overwrite values assigned in the child constructor before the SUPER call

Fixed a problem with CHECKED() and UNCHECKED() syntax in the VO dialect

Fixed a problem with choosing overloads for methods where an overload exists with  a single object parameter and also an overload with an object[] parameter.

Added support to the parser for LOCAL STATIC syntax

Fixed a problem with compiler option /vo9 (Allow missing return values) and procedures or methods that return VOID

Improved debugger sequence point generation. The compiler no longer generates 'hidden' breakpoint information for startup and closedown code in the VO/Vulcan dialects, and for expression statements no longer a double step is necessary.

ACCESS and ASSIGN for partial classes could generate error messages without source file name. This has been solved.
The compiler now generates slightly different code for these "partial" properties.
The Access and Assign are implemented as compiler generated methods and the property getter and property setter now call these methods.

The compiler was not recognizing the _WINCALL calling convention. This has been fixed.

The compiler now generates a warning when the #pragma command is used

Visual Studio Integration

More performance improvements in the editor. Especially large source files with incorrect code could slow down the editor.

The editor parser no longer tries to parse include files repeatedly when these files contain #defines only (like the Vulcan header files)

The source code editor tried to show intellisense for words in a comment region. That has been fixed.

We have started work on Object Browser and Class Browser.

Opening and closing of projects should be slightly faster

The internal code model used by the editors now disposes its loaded information when projects are closed and no projects need this information anymore. This should reduce the memory usage of the X# project system

Matching keywords, such as IF .. ENDIF and FOR .. NEXT should now be highlighted in the editor

If you select an identifier in the editor then that identifier will be highlighted in the current method/function on all places where it is used

We have added several features that you need to enable/disable on the Tools/Options/Text Editor/XSharp/Intellisense dialog:

oThe code completion in the editor also supports instance member completion when a dot is pressed.
Please note that the compiler ONLY accepts this in the Core language, not in the VO & Vulcan dialect. So the option has no effect inside projects with other dialects.

oWe have added some options to control the sorting of the DropDown comboboxes in the editor, as well as if fields/instance variables should be included in these comboboxes. When you do not sort, then the entries in the dropdown box will be shown in the order in which they are found in the source file.

oWe have added the option to autocomplete identifiers when typing. This includes locals, parameters, class fields, namespaces, types etc.

Overridden methods in subclasses with the same signature as the parent methods they override are no longer counted as overloads in completionlists

A missing reference DLL could "kill" the intellisense engine. This no longer happens. Of course the type info from a missing referenced DLL is not included.

Properties and methods in the generated source files for XAML code (the .g.prg files in the OBJ folder) are now also parsed and included in the completion lists in intellisense and in the Class Browser and Object Browser windows.


The installer now includes the correct version of VOXPorter <g>

VOXporter now supports the following commandline options:
       /s:<source folder or aef>

         /d:<destination folder>

         /r:<runtime folder>



Some code corrections were added for issues found in the GUI classes

The template files can now also be found when VOXPorter is run from a different working directory

Changes in 1.1.2


Added compiler warning for code that contains a #pragma

Fixed a problem with iif() functions and negative literal values

Visual Studio Integration

Fixed a slowness in the editor after typing a send (: ) operator

Enum values are now properly decoded in the debugger

Fixed the CodeDom provider for handling literal FALSE values and negative numbers. As a result, more (Vulcan created) winforms should open without problems

Some positional keywords (such as ADD and REMOVE) are no longer colored as keyword in the editor for incomplete code when they appear after a colon ‘:’ or dot ‘.’;


Fixes for exporting the VO RDD Classes from the SDK


Changes in 1.1.1


Fixed a problem with Debugger Breakpoints for DO CASE and OTHERWISE

Fixed a problem with Debugger Breakpoints for sourcecode that is defined in #included files

Added support for the Harbour Global Syntax where the GLOBAL keyword is optional

Fixed a problem with FOR.. NEXT loops with negative step values

In some situations the @@ prefix to avoid keyword conflicts was not removed from workarea names or field names. This has been fixed

In the VO/Vulcan dialect a warning (XS9015) was generated when a default parameterless SUPER constructor call was automatically generated. This error message is now suppressed. However a generated SUPER constructor call with parameters still generates a warning.

Prepared the compiler for Xbase type names and function names in the XSharp Runtime


Fixed a crash in the preprocessor

The preprocessor was generating an error "Optional block does not contain a match marker" for blocks without match marker. This is now allowed.
(for example for the ALL clause in some of the Database UDCs )

When the same include files was used by multiple source files, and different sections of this file were included because of different #ifdef conditions, then the preprocessor would get "confused". This has been fixed.

Debugger file/line number information from source code imported from #include files is not processed correctly.

Visual Studio Integration

Fixed several issues with the Windows Form Editor

The class declaration generated by the VO compatible editors now included the PARTIAL modifier.

Changes in 1.1


Fixed a problem with Codeblocks used in late bound code after the release of X# 1.0.3

Fixed a problem with overriding properties in a subclass that inherit from a class where only the Assign (Set) or Access (Get) are defined.

The compiler option /vo16: automatically generate VO Clipper constructors has been implemented.

Fixed a crash in the compiler for compiler errors that occur on line 1, column 1 of the source file

Fixed a problem where overflow checking was not following the /ovf compiler option

Fixed problem with public modifier for interface methods

Added proper error message with unreachable fields in external DLLs

Fixed a problem with debugger sequence points (debugger stepping)

X# generated pdb files are now marked with the X# language GUID so they are recognized as X# in the VS debugger

DATETIME (26)  and DECIMAL (27) are added as UsualType to the compiler in preparation of the X# runtime that allows usuals of these types

Compiler options /VO15 and /VO16 now produce an error message when used outside the VO/Vulcan dialect

Methods declared outside a class (VO style code) would declare a private class and not a public class

ASTYPE has been changed to a positional keyword

Fixed a problem with the Chr() and _Chr() functions for literal numbers > 127

Added support for the __CLR2__ and __CLR4__ compiler macros. The version is derived from the folder name of mscorlib.dll and/or system.dll

The Codeblock syntax was not working in the Core dialect.

Some new keywords, such as REPEAT, UNTIL, CATCH, FINALLY,VAR, IMPLIED, NAMESPACE, LOCK, SCOPE, YIELD, SWITCH etc are now also positional and will only be recognized as keyword when at the start of a line or after a matching other keyword.
This should help prevent cryptic error messages when these keywords are used as function names.

Visual Studio

Source code editor

Added Goto Definition for Functions and Procedures

Improved Info tips for Functions and Procedures

Improved case synchronization

Added first version of smart indenting

Fixed lookup problems in the intellisense engine that could lock up VS

Compiler Generated types are now suppressed from the completion lists.

Added partial support for intellisense for LOCAL IMPLIED and VAR variables

Added support for Format Document. This also sets the case for identifiers according to the tools defined in the Tools/Options menu

Performance improvements for the background file scanner. This scanner is also paused during the build process to improve the compilation speed.

Project System and MsBuild

Fixed a problem in the project files with conditioned property groups. Existing projects will be updated automatically

Added support for the /vo16 compiler option in MsBuild and the VS Project Property pages.

Fixed a problem with the /nostddef compiler option which was not working as expected.

Fixed a problem which would occur when entering resources or settings in the project property dialog

Fixed a problem with the /nostdlib compiler option

License.Licx files are now added as "Embedded Resource"

Fixed a problem with the automatic adding of License files

When a project has a "broken reference" and a new reference is added with the correct location, then the broken reference will be deleted and the new references will be added instead.

The MSBuild support DLL was unable to find the location of the compiler and native resource compiler when running inside a 64 bit process

Form Editor

Improved Windows Form Editor support for types defined in project references. We will now detect the location of the output files for these projects, like the C# and VB project systems.

The Code parser for the Form Editor was having problems with untyped methods. This has been fixed.

VO Window and Menu Editor

The code generator for the Window and Menu editor will delete old unused defines.

Changed the item template for VO windows to fix a problem when adding an event handler to a window that has not been saved yet

The code generator for the Window editor was not outputting a style for WS_VISIBLE. This has been fixed.


This build introduces a first version of the XSharp debugger support

The Visual Studio debugger now shows the language X# in the callstack window and other places

Functions, Methods and procedures are now displayed in the X# language style in the callstack window

Compiler generated variables are no longer shown in the locals list

The locals list now shows SELF in stead of this

X# predefined types such as WORD, LOGIC etc are shown with their X# type names in the locals window


Added support for the Test Explorer window

Added templates for unit testing with XUnit, NUnit and Microsoft Test


Added warning when Vulcan was (re)installed after XSharp, which could cause a problem in the Visual Studio integration

The VS Parser was marking Interfaces as structure in stead of interface. This has been fixed.

The tool XPorter tools have better names in the VS Tools Menu

The VS Background parser gets suspended while looking up type information to improve the intellisense speed

Several changes were made to the templates that come with X#


Fix problem in propertygroup conditions.


Generate clipper constructors is now disabled by default

Fixed a problem in the VS Template files.

Changes in 1.0.3


Fixed a problem with the index calculation for Vulcan Arrays indexed with a usual argument

Fixed a problem with the generation of automatic return values for code that ends with a begin sequence statement or a try statement

Optimized the runtime performance for literal symbols.
The compiler now generates a symbol table for the literal symbols and each literal symbol used in your app is only created once.
You may experience a little delay at startup if your app uses a LOT (thousands) of literal symbols. But the runtime performance should be better.

Added a compiler error for code where numerics are casted to an OBJECT with the VO compatible _CAST operator.
This is no longer allowed:
LOCAL nValue as LONG
nValue := 123
oObject := OBJECT(_CAST, nValue)

Changes in 1.0.2


Added support for XML doc generation. We support the same tags that the C# compiler and other .Net compiler support.

Improved some parser errors.

Created separate projects for portable and non portable (.Net framework 4.6) for the compiler and scripting

Fixed the code generation for conversion from USUAL to a known type. Now the same error is generated that Vulcan produces when the object type in the usual does not match the type of the target variable

When declaring a type with the same name as the assembly now a compiler error is generated with a suggested work around.

Fixed a strange compiler message when using a PTR() operation on a method call

Indexed access to bytes in a PSZ is now 1 based like in VO when the VO dialect is used. The Vulcan dialect needs 0 based index access like Vulcan.

The error message for compound assignments of FLOAT and USUAL has been removed. The compiler now contains a workaround for the problem in the Vulcan Runtime

For ambiguous code where the compiler has to choose between a Function call and a static method call in any other class, the compiler now chooses the function call over the method call (Vo and Vulcan dialect). The warning will still be generated.

When passing a variable by reference with the @ sign the compiler will now check to see if the declared type of the function/method parameter matches the type of the local variable.

Some compiler warnings for unused variables were being suppressed in the VO/Vulcan dialect. They are activated again.


The scripting was not working in release 1.01

Visual Studio Integration

QuickInfo could generate a 'hang' in the VS editor. This has been fixed

Added quickinfo for globals and defines

Added completionlists for globals and defines

Added VO Form editor to edit vnfrm/xsfrm files and generate the code and resources

Added VO Menu editor to edit vnmnu/xsmnu files and generate the code and resources

Added VO DbServer editor and VO Fieldspec editor to edit vndbs/xsdbs and vnfs/xsfs files and generate the code and resources

Added keyword and identifier case synchronization.

Fixed a problem where typing SUPER( in the editor could throw an exception

Prebuild and Postbuild entries in the project file are now configuration specific

Added support for XML Doc generation in the project system

Fixed a 'hang' that could occur with Visual Studio 2017 version 15.3 and later

VO Xporter

Fixed a problem when importing certain VO 2.7 AEF files

Fixed a problem with acceptable characters in the solution folder name

VO Form and menu entities are also included in the xsproj file

Added an option to the INI files to specify the Vulcan Runtime files location (                )

Changes in General Release (


Fixed a problem with VERY old versions of the Vulcan Runtime

Variables declared as DIM Byte[] and similar are now Pinned by the compiler

[Return] attribute was not properly handled by the compiler. This has been fixed

Compound Assignment (u+= f or -=) from USUAL and FLOAT were causing a stackoverflow at runtime caused by a problem in the Vulcan Runtime. These expressions now generate a compiler error with the suggestion to change to a simple assignment ( u := u + f)

Visual Studio Integration

Project References between XSharp Projects were also loaded as assemblyreference when resolving types. This could lead to speed problems and unnecessary memory usage

Improved the speed of the construction of Completion Lists (such as methods and fields for a type).

We have also added Completion List Tabs, where you can see fields, properties, methods etc. on separate tabs. You can enable/disable this in the Tools/Options/Text Editor/XSharp/Intellisense options page.

VO XPorter

We have added a check to make sure that the default namespace for a X# project cannot contain a whitespace character

Changes in General Release (1.0.1)

New Features

We have added support for ENUM Basetypes (ENUM Foo AS WORD)

We have added a separate syntax for Lambda Expressions

We have added support for Anonymous Method Expressions

Typed local variables can now also be used for PCALL() calls

Methods with the ExtensionAttribute and Parameters with the ParamArrayAttribute attributes now compile correctly, but with a warning


Fixed a problem with a late bound assign of a literal codeblock

Resolved several name conflicts

Improved several of the error messages

Fixed compilation problem for Properties with only a SET accessor

Fixed a crash in a switch block with an if .. endif statement

Fix problem with virtual instance methods and structures

Fixed name conflict foreach variables used in Array Literals

Changed resolution for Functions and static methods with the same name.
In the VO/Vulcan dialect functions take precedence over static methods. If you want to call the static method then then you need to prefix the method call with the classname.

There is a separate topic in this documentation now that describes the syntax differences and similarities between Codeblocks, Lambda Expressions and Anonymous Method Expressions.

Fixed incorrect error message for Start() function with wrong prototype.

When an ambiguity is detected between a function and a static method then a warning is displayed

Visual Studio

Added parameter tips for Functions and methods from "Using Static" classes

Added parameter tips for Clipper Calling Convention functions and methods

Added support for generics in Intellisense

Intellisense will show keywords in stead of native type names (WORD in stead of System.UInt16 for example)

Parameter tips are now shown when a opening '(' or '{' is typed as well as when the user types a comma ','.

Parameter tips will show REF OUT and AS modifiers

Added intellisense for COM references, both for normal COM references as well as for Primary Interop Assemblies. Also members from implemented interfaces are now included in intellisense code completion (this is very common for COM).

Improved intellisense for Project References from other languages, such as C# and VB.

Added intellisense for Functions in referenced projects and referenced Vulcan and/or X# assemblies

Suppress "special type names" in intellisense lists

Added support for "VulcanClassLibrary" attribute to help find types and functions

Errors from the Native Resource compiler are now also included in the error list

Fixed problem with parameter tips for Constructors

Added memberlist support for X# type keywords such as STRING, REAL4 etc.

Fixed several issues with the Windows Form editor in relation to ActiveX controls

Added a menu option to start the VO Xporter tool

Added background scanning for dependent items, to make sure that newly generated code is scanned and available for intellisense.

Several changes to the Windows Forms editor and project system:

oAdded support for adding ActiveX controls

oAdded support for Form Inheritance. Our forms are also visible in the C# Inherited form wizard

oAdded support to add our Windows Forms Custom Controls to the ToolBox in Visual Studio

oSome performance enhancements in the Codedom Parser that is used by the Windows Form Editor. You should notice this for larger forms.

Fixed several crashes reported by users

Native Resource files (.rc) now open in the Source code editor

Improved background parsing speed

Improved keyword colorization speed

Improved handling of Type and Member dropdowns in the editor


Added a first version of the VO Xporter tool

The installer now registers .xsproj files, .prg, .ppo. .vh, .xh and .xs files so they will be opened with Visual Studio


We have added some chapters on how to convert your VO AEF and/or PRG files to a XIDE project and/or a Visual Studio solution.

Changes in 0.2.12


We have added the ability to use X# scripts. Some documentation about how this works can be found here. You can also find scripting examples in the
c:\Users\Public\Documents\XSharp\Scripting folder


All dialects

The compiler is now based on the Roslyn source code for C# 7.

Accesses and Assigns with the same name for the same (partial) class in separate source files are now merged into one property. This will slow down the compiler somewhat. We recommend that you define the ACCESS and ASSIGN in the same source file.

Added support for repeated result markers in the preprocessor

We have added the compiler macro __DIALECT_HARBOUR__

Fixed the name resolution between types, namespaces, fields, properties, methods, globals etc. The core dialect is very close to the C# rules, the other dialect follows the VO rules.

Some warnings for ambiguous code have been added

_Chr() with untyped numeric values would crash. This has been fixed.

We made some changes to the character literal rules. For the VO and Harbour dialect there are now other rules then for Core and Vulcan. See the help topic for more information

VO and Vulcan Dialect

Several VO compatibility issues have been fixed

The QUIT, ACCEPT, WAIT, DEFAULT TO and STORE command are now removed from the compiler and defined in our standard header file "XSharpDefs.xh" which is located in the \Program Files(x86)\XSharp\Include folder. These commands are not compiled in the core dialect

Added support for CONSTRUCTOR() CLASS MyClass and DESTRUCTOR CLASS MyClass (in other words, outside the CLASS .. ENDCLASS construct

The # (not equal) operator is now recognized when used without space before the keywords NIL, NULL_STRING, NULL_OBJECT etc. so #NIL is not seen as the symbol NIL but as Not Equal To NIL

SizeOf and _TypeOf were special tokens in VO and could not be abbreviated. We have changed the X# behavior to match this. This prevents name conflicts with variables such as _type.

We have added support for DLL entrypoints with embedded @ signs, such as "CAVOADAM.AdamCleanupProtoType@12"

(DWORD) (-1) would require the unchecked operator. This is now compatible with Vulcan and generates a DWORD with the value System.Uint32.MaxValue.

STATIC VOSTRUCT now gets compiled as INTERNAL VOSTRUCT. This means that you cannot have the same structure twice in your app. Why would you want to do that ?

Fixed several cases of "incorrect" code that would be compiled by VO, such as a codeblock that looks like:
       cb := { |x|, x[1] == 1 }
Note the extra comma.
This now compiled into the same codeblock as:

       cb := { |x| x[1] == 1 }

The /vo16 compiler option has been disabled for now (does not do anything) because it had too many side effects.

Visual Studio Integration

Deleted files and folders are moved them to the Trash can.

Fixed an intellisense problem in the XAML editor

Added support for Code Completion between different X# projects

Added support for Code Completion and other intellisense features for source code in VB and C# projects

Added support for parameter info


We have added (generated) topics for all undocumented compiler errors. Some topics only contain the text that is shown by the compiler. More documentation will follow. Also some documentation for the X# Scripting has been added.

Changes in 0.2.11


All dialects

Improved some error messages, such as for unterminated strings

Added support for the /s (Syntax Check only) command line option

Added support for the /parseonly command line option which is used by the intellisense parser

Added some compiler errors and warnings for invalid code

The preprocessor did not properly handle 4 letter abbreviations for #command and #translate. This has been fixed

Fixed some problems found with the preprocessor

We switched to a new Antlr parser runtime. This should result in slightly better performance.

Changed the way literal characters and strings are defined:

oIn the Vulcan dialect a literal string that is enclosed with single quotes is a char literal. Double quotes are string literals

oIn the Core and VO dialect a literal string that is enclosed with single quotes is a string literal. Double quotes are also string literals.
To specify a char literal in Core and VO you need to prefix the literal with a 'c':


    LOCAL cChar as CHAR
     cChar := c'A'        

Changed the way literal characters and strings are defined:

sizeof() and _sizeof() no longer generate a warning that they require 'unsafe' code, when compiling for x86 or x64. When compiling for AnyCpu the warning is still produced.

When the includedir environment variable was not set then the XSharp\Include folder would also not be found automatically.

VO/Vulcan Compatibility

Added /vo16 compiler option to automatically generate constructors with Clipper calling convention for classes without constructor

Harbour Compatibilty

Started work on the Harbour dialect. This is identical with the VO/Vulcan dialect. The only difference so far is that the IIF() expressions are optional

Visual Studio

New features / changed behavior:

Added Brace Matching

Added Peek definition (Alt-F12)

All keywords are not automatically part of the Completionlist

Fixed a member lookup problem with Functions and Procedures inside a Namespace

Increased background parser speed for large projects

Fixed type lookup for fields and properties from parent classes

Fixed problem where CSharp projects could not find the output of a XSharp project reference

The Intellisense parser now properly used all current projects compiler options.

Prevent crashes when the X# language buffer is fed with "garbage" such as C# code


The local template cache and components cache for VS2017 was not cleared properly this has been fixed.

Added code to properly unregister an existing CodeDomProvider when installing


Several empty chapters are now hidden.

Added description of the templates

Changes in 0.2.10

This build focuses on the last remaining issues in the VO and Vulcan compatibility and adds a lot of new features to the Visual Studio integration.


VO/Vulcan Compatibility

We have completed support for the DEFINE keyword. The type clause is now optional. The compiler will figure out the type of the define when no type is specified.
The DEFINEs will be compiled to a Constant field of the Functions class, or a Readonly Static field, when the expression cannot be determined at compile time (such as for Literal dates or symbols).

We have extended the preprocessor . It now has support for #command, #translate, #xcommand and #xtranslate. Also "Pseudo function" defines are supported, such as :
       #define MAX(x,y) IIF((x) > (y), (x), (y))
This works just like a #xtranslate, with the exception that the define is case sensitive (unless you have enabled the "VO compatible preprocessor" option (/vo8).
The only thing that is not working in the preprocessor is the repeated result marker.

In VO/Vulcan mode the compiler now accepts "garbage" between keywords such as ENDIF and NEXT and the end of the statement, just like the VO compiler.
So you no longer have to remove "comment" tokens after a NEXT or ENDIF. This will compile without changes in the VO and Vulcan dialect:
  IF X == Y
  ENDIF X == Y
  FOR I := 1 to 10
We do not recommend this coding style, but this kind of code is very common...

Fixed an issue with recognition of single quoted strings. These were always recognized as CHAR_CONST when the length of the string was 1. Now they are treated as STRING_CONST and the compiler backend has been adjusted to convert the STRING literals to CHAR literals when needed.

In VO and Vulcan dialect when the compiler option /vo1 is used then RETURN statements without value or with a return value of SELF are allowed for the Init() and Axit() methods. Other return values will trigger a compiler warning and will be ignored.

New features / changed behavior:

The compiler now produces an error when a source file ends with an unterminated multi line comment

Added ASTYPE expression, similar to the AS construct in other languages. This will assign a value of the correct type or NULL when the expression is not of the correct type:

       VAR someVariable := <AnExpression> ASTYPE <SomeType>

The Chr() and _Chr() functions are now converted to a string or character literal when the parameter is a compile time constant

Compilation speed for assemblies with larger numbers of functions, procedures, defines, globals or _dll functions has been improved.

_DLL FUNCTIONS now automatically are marked with CharSet.Auto

Fixed some inconsistencies between Colon (:) and Point (.) interoperability and the super keyword

Fixed several compiler issues reported by FOX subscribers and other users.

Visual Studio

New features / changed behavior:

Tested and works with the release version of Visual Studio 2017

We have added support for regions inside the VS editor. At this moment most "entities" are collapsible as well as statement blocks, regions and lists of usings, #includes and comments.

We have added support for member and type drop downs in the VS Editor

We have added support for Code completion in the VS editor

We have added support for Goto definition in the VS Editor

Errors detected by the intellisense scanner are now also included in the VS error list.

We have added help links to the errors in the VS error list. The help links will bring you to the appropriate page on the X# website. Not all the help pages are complete yet, but at least the infrastructure is working.

We have added support for snippets and included several code snippets in the installer

We have made several changes to the project properties dialogs

oThe pre and post build events are now on a separate page for the Project Properties. These are now also not defined per configuration but are shared between the various configurations.
If you want to copy output results to different folders for  different configurations you should use the $(Configuration) and $(Platform) variables

oWe have  moved the Platform and Prefer32Bits properties to the Build page to make them configuration dependent

oFixed a problem with casing of the AnyCPU platform which would result in duplicate items in the VS Platform combobox

oAdded support for ARM and Itanium platform types

oSome properties were saved in project file groups without a platform identifier. This has been fixed

oWe have added a project property to control how Managed file resources are included: Use Vulcan Compatible Managed Resources
When 'True' then resources files are included in the assembly without namespace prefix. When 'False' then the resource files are prefixed with the namespace of the app, just like in other .Net languages, such as C#

We have fixed some code generation problems

The parser that is used in the Windows Forms editor now also properly handles background images. Both images in the resx for the form and also background images in the shared project resources

We have added Nuget support for our project system.

We have made several changes to fix problems in project files

oThe project system now silently fixes problems with duplicate items

oFixed a problem with dependencies between xaml files and their dependent designer.prg files and other dependent files

oFixed a problem with dependent items in sub folders or in a folder tree that includes a dot in a folder name.

oFixed a problem in the WPF template

Fixed a refresh problem when deleting a references node

Added implementation of the OAProject.Imports property, which is used by JetBrains


Fixed a problem converting WPF style projects

Changes in 0.2.9


With this build you can compile the Vulcan SDK without changes, except for some obvious errors in the Vulcan SDK that Vulcan did not find!
We consider the Vulcan Compatibility of the compiler finished with the current state of the compiler. All Vulcan code should compile without proble now.

VO/Vulcan Compatibility

New features / changed behavior:

All Init procedures are now properly called at startup. So not only the init procedures in the VOSDK libraries but also init procedures in other libraries and the main exe

Changed the method and type resolution code:

oA method with a single object parameter is now preferred over a method with an Object[] parameter

oWhen both a function (static method) exists and an instance method we will now call the static method in code inside methods that does not have a SELF: or SUPER: prefix.

oIn situations where the @ operator is used to pass variables by reference.

oTo make it more compatible with Vulcan for overloads with different numeric types.

oTo prefer a method with specific parameters over a method with usual parameters

oTo avoid problems with Types and Namespaces with the same name.

oTo prefer a method with an OBJECT parameter over the one with OBJECT[] parameters when only 1 argument is passed

oWhen 2 identical functions or types are detected in referenced assemblies we now choose the one in the first referenced assembly like Vulcan does, and generate warning 9043

The sizeof operator now returns a DWORD to be compatible with VO and Vulcan.

Added support for EXIT PROCEDURES (PROCEDURE MyProcedure EXIT). These procedures will automatically be called during program shutdown, just before all the global variables are cleared.
The compiler now generates an $Exit function for each assembly in which the exit procedures will be called and the reference globals in an assembly will be cleared. In the main app a $AppExit() function is created that will call the $Exit functions in all references X# assemblies. When a Vulcan compiled assembly is referenced, then all the public reference globals will be cleared from the $AppExit() function.

Added support for PCALL and PCALLNATIVE

Added support for several Vulcan compatible compiler options:

o/vo1 Allow Init() and Axit() for constructor and destruction

o/vo6 Allow (global) function pointers. DotNet does not "know" these. They are compiled to IntPtr. The function information is preserved so you can use these pointer in a PCALL()

o/ppo. Save the preprocessed compiler output to a file

o/Showdefs Show a list of the defines and their values on the console

o/showincludes Show a list of the included header files on the console

o/verbose Shows includes, source file names, defines and more. on the console

oDEFAULT TO command

oACCEPT command

oWAIT command

Several code generation changes:

oChanged the code generation for DIM elements inside VOStruct arrays because the Vulcan compiler depends on a specific naming scheme and did not recognize our names.

oImproved the code generation inside methods with CLIPPER calling convention.

Bug fixes

Implicit namespaces are now only used when the /ins compiler option is enabled. In Vulcan dialect the namespace Vulcan is always included.

Fixed several problems with the @ operator and VOSTRUCT types

Fixed a problem with DIM arrays of VOSTRUCT types

Fixed a problem with LOGIC values inside VOSTRUCT and UNION types

Fixed several problems with the VOStyle _CAST and Conversion operators.

Fixed several numeric conversion problems

Fixed several problems when mixing NULL, NULL_PTR and NULL_PSZ

Fixed several problems with the _CAST operator

Fixed several problems with PSZ Comparisons. X# now works just like Vulcan and VO and produces the same (sometimes useless) results

Fixed a problem with USUAL array indexes for multi dimensional XBase Arrays

Fixed codeblock problems for codeblocks where the last expression was VOID

Changed code generation for NULL_SYMBOL

Preprocessor #defines were sometimes conflicting with class or namespace names. For example when /vo8 was selected the method System.Diagnostics.Debug.WriteLine() could not be called because the DEBUG define was removing the  classname. We have changed the preprocessor so it will no longer replace words immediately before or after a DOT or COLON operator.

Fixed a compiler crash when calling static methods in the System.Object class when Late Binding was enabled

Fixed String2Psz() problem inside PROPERTY GET and PROPERTY SET

And many more changes.

All dialects

New features / changed behavior:

Several code generation changes:

oThe code generation for ACCESS and ASSIGN has changed. There are no longer separate methods in the class, but the content of these methods is now inlined in the generated Get and Set methods for the generated property.

oOptimized the code generation for IIF statements.

oThe debugger/step information has been improved. The debugger should now also stop on IF statements, FOR statements, CASE statements etc.

Indexed access to properties defined with the SELF keyword can now also use the "Index" property name

Functions and Procedures inside classes are not allowed (for now)

RETURN <LiteralValue> inside an ASSIGN method will no longer allocate a variable and produce an warning

Several keywords are now also allowed as Identifier (and will no longer have to be prefixed with @@ ):
Delegate, Enum, Event, Field, Func, Instance, Interface, Operator, Proc, Property, Structure, Union, VOStruct and many more
As a result the following is now valid code (but not recommended):

You can see that the Visual Studio language support also recognizes that INTERFACE and OPERATOR are not used as keywords in this context

Bug fixes

Fixed a problem with the REPEAT UNTIL statement

Fixed a crash for code with a DO CASE without a matching END CASE

Fixed several issues for the code generation for _DLL FUNCTIONs and _DLL PROCEDUREs

Fixed a problem (in the Roslyn code) with embedding Native Resources in the Assembly.

Fixed a problem with the _OR() and _AND() operators with more than 2 arguments.

Added support for Pointer dereferencing using the VO/Vulcan Syntax : DWORD(p) => p[1]

Fixed several problems with the @ operator

When two partial classes had the same name and a different casing the compiler would not properly merge the class definitions.

Fixed a crash when a #define in code was the same as a define passed on the commandline

Indexed pointer access was not respecting the /AZ compiler option (and always assumed 0 based arrays). This has been fixed

Fixed a problem with the caching of preprocessed files, especially files that contain #ifdef constructs.

Fixed a problem which could occur when 2 partial classes had the same name but a different case

Fixed a compiler crash when a referenced assembly had duplicate namespaces that were only different in Case

Fixed problems with Functions that have a [DllImport] attribute.

Error messages for ACCESS/ASSIGN methods would sometimes point to a strange location in the source file. This has been fixed.

Fixed a problem with Init Procedures that had a STATIC modifier

Fixed a problem in the preprocessor when detecting the codepage for a header file. This could cause problems reading header files with special characters (such as the copyright sign ©)

And many more changes.

Visual Studio Integration

Added support for all compiler options in the UI and the build system

Fixed problems with dependent file items in subfolders

The Optimize compiler option was not working

The 'Clean' build option now also cleans the error list

Under certain conditions the error list would remain empty even though there were messages in the output pane. This has been fixed.

The <Documentationfile> property inside the xsproj file would cause a rebuild from the project even when the source was not changed

Earlier versions of XPorter could create xsproj files that would not build properly. The project system now fixes this automatically

Fixed a problem with the build system and certain kind of embedded managed resources



We have added many descriptions to the commandline options

We have added a list of the most common compiler errors and warnings.

Changes in 0.2.8


VO/Vulcan Compatibility

Default Parameters are now handled like VO and Vulcan do. This means that you can also have date constants, symbolic constants etc as default parameter

String Single Equals rules are now 100% identical with Visual Objects. We found one case where Vulcan does not return the same result as Visual Objects. We have chosen to be compatible with VO.

When compiling in VO/Vulcan mode then the init procedures in the VO SDK libraries are automatically called. You do not have to call these in your code anymore
Also Init procedures in the main assembly are called at startup.

The /vo7 compiler option (Implicit casts and conversions) has been implemented. This also includes support to use the @ sign for REF parameters

You can now use the DOT operator to access members in VOSTRUCT variables

We have fixed several USUAL - Other type conversion problems that required casts in previous builds

The compiler now correctly parses VO code that contains DECLARE METHOD, DECLARE ACCESS and DECLARE ASSIGN statements and ignores these

The compiler now parses "VO Style" compiler pragma's (~"keyword" as white-space and ignores these.

Fixed a problem where arrays declared with the "LOCAL aSomething[10] AS ARRAY" syntax would not be initialized with the proper number of elements

Fixed a problem when calling Clipper Calling Convention constructors with a single USUAL parameter

Attributes on _DLL entities would not be properly compiled. These are recognized for now but ignored.

Fixed several numeric conversion problems

New features

We have added support for Collection Initializers and Object Initializers

Anonymous type members no longer have to be named. If you select a property as an anonymous type member then the same property name will be used for the anonymous type as well.

Missing closing keywords (such as NEXT, ENDIF, ENDCASE and ENDDO) now produce better error messages

IIF() Expressions are now also allowed as Expression statement. The generated code will be the same as if an IF statement was used

  LOCAL lEven as LOGIC
  IIF( nValue %2 == 0, lEven := TRUE, lEven := FALSE)

We really do not encourage to hide assignments like this, but in case you have used this coding style,it works now <g>.

AS VOID is now allowed as (the only) type specification for PROCEDUREs

We have added a .config file to the exe for the shared compiler that should make it faster

The XSharpStdDefs.xh file in the XSharp is now automatically included when compiling. This file declares the CRLF constant for now.

Include files are now cached by the compiler. This should increase the compilation speed for projects that depend on large included files, such as the Win32APILibrary header file from Vulcan

When a function is found in an external assembly and a function with the same name and arguments is found in the current assembly, then the function in the current assembly is used by the compiler

Compiler error messages for missing closing symbols should have been improved

Compiler error messages for unexpected tokens have been improved

Bug fixes

Several command-line options with a minus sign were not properly handled by the compiler

Fixed several crashes related to assigning NULL_OBJECT or NULL to late bound properties have been fixed

Partial class no longer are required to specify the parent type on every source code location. When specified, the parent type must be the same of course. Parent interfaces implemented by a class can also be spread over multiple locations

We have fixed a crash that could happen with errors/warnings in large include files

Abstract methods no longer get a Virtual Modifier with /vo3

Fixed a problem with virtual methods in child classes that would hide parent class methods

Automatic return value generation was also generating return values for ASSIGN methods. This has been fixed.

We fixed a problem with the Join Clauses for LINQ Expressions that would cause a compiler exception

The /vo10 (compatible iif) compiler option no longer adds casts in the Core dialect. It only does that for the VO/Vulcan dialect

Visual Studio Integration

We have changed the way the error list and output window are updated. In previous version some lines could be missing on the output window, and the error code column was empty. This should work as expected now.

We have merged some code from some other MPF based project systems, such as WIX (called Votive), NodeJS and Python (PTVS) to help extend our project system. As a result:

oOur project system now has support for Linked files

oOur project system now has support for 'Show All Files' and you can now Include and Exclude files. This setting is persisted in a .user file, so you can exclude this from SCC if you want.

oWe have made some changes to support better 'Drag and Drop'

We have fixed several issues with regard to dependent items

When you include a file that contains a form or user control, this is now recognized and the appropriate subtype is set in the project file, so you can open the windows forms editor

We are now supporting source code generation for code behind files for .Settings and .Resx files

The combobox in the Managed Resource editor and Managed Settings tool to choose between internal code and public code is now enabled. Selecting a different value in the combobox will change the tool in the files properties.

The last response file for the compiler and native resource compiler are now saved in the users Temp folder to aid in debugging problems.

The response file now has each compiler option to a new line to make it easier to read and debug when this is necessary.

The code generation now preserves comments between entities (methods)

We fixed several minor issues in the templates

When the # of errors and warnings is larger than the built-in limit of 500, then a message will be shown that the error list was truncated

At the end of the build process a line will be written to the output window with the total # of warnings and errors found

The colors in the Source Code Editor are now shared with the source code editors for standard languages such as C# and VB

When you have an inactive code section in your source code, embedded in an #ifdef that evaluates to FALSE then that section will be visibly colored gray and there will be no keyword highlighting. The source code parser for the editor picks up the include files and respects the path settings. Defines in the application properties dialog and the active configuration are not respected yet. That will follow in the next build.


Changes in


The compiler was not accepting wildcard strings for the AssemblyFileVersion Attribute and the AssemblyInformationVersion attribute. This has been fixed

The #Pragma commands #Pragma Warnings(Push) and #Pragma Warnings(Pop) were not recognized. This has been fixed.

The compiler was not recognizing expressions like global::System.String.Compare(..). This has been fixed

Visual Studio Integration

Dependent items in subfolders of a project were not recognized properly and could produce an error when opening a project

Fixed a problem in the VulcanApp Template

The Windows Forms Editor would not open forms in a file without begin namespace .. end namespace. This has been fixed

Source code comments between 'entities' in a source file is now properly saved and restored when the source is regenerated by the form editor

Unnecessary blank lines in the generate source code are being suppressed

The XPorter tool is now part of the Installation

Comments after a line continuation character were not properly colored

Changed the XSharp VS Editor Color scheme to make certain items easier to read

New managed resource files would not be marked with the proper item type. As a result the resources would not be available at runtime. This has been fixed.

Added 'Copy to Output Directory' property to the properties window


The installer, exe files and documentation are now signed with a certificate

Changes in 0.2.7


New features:

Added support for the VOSTRUCT and UNION types

Added support for Types as Numeric values, such as in the construct
       IF UsualType(uValue) == LONG

Added a FIXED statement and FIXED modifier for variables

Added support for Interpolated Strings

Empty switch labels inside SWITCH statements are now allowed. They can share the implementation with the next label.
Error 9024 (EXIT inside SWITCH statement not allowed) has been added and will be thrown if you try to exit out of a loop around the switch statement.
This is not allowed.

Added support for several /vo compiler options:
- vo8 (Compatible preprocessor behavior). This makes the preprocessor defines case insensitive. Also a define with the value FALSE or 0 is seen as 'undefined'
- vo9 (Allow missing return statements) compiler option. Missing return values are also allowed when /vo9 is used.  
Warnings 9025 (Missing RETURN statement) and 9026 (Missing RETURN value) have been added.
- vo12 (Clipper Integer divisions)

The preprocessor now automatically defines the macros __VO1__ until __VO15__ with a value of TRUE or FALSE depending on the setting of the compiler option

The FOX version of the compiler is now distributed in Release mode and much faster. A debug version of the compiler is also installed in case it is needed to aid in finding compiler problems.

Changed behavior

The compiler generated Globals class for the Core dialect is now called Functions and no longer Xs$Globals.

Overriding functions in VulcanRTFuncs can now be done without specifying the namespace:
When the compiler finds two candidate functions and one of them is inside VulcanRTFuncs then the function that is not in VulcanRTFuncs is chosen.

Warning 9001 (unsafe modifier implied) is now suppressed for the VO/Vulcan dialect. You MUST pass the /unsafe compiler option if you are compiling unsafe code though!

Improved the error messages for the Release mode of the compiler

Bug fixes

RETURN and THROW statements inside a Switch statement would generate an 'unreachable code' warning. This has been fixed

Fixed several problems with mixing signed and unsigned Array Indexes

Fixed several problems with the FOR .. NEXT statement. The "To" expression will now be evaluated for every iteration of the loop, just like in VO and Vulcan.

Fixed several compiler crashes

Fixed a problem with implicit code generation for constructors

Fixed a visibility problem with static variables inside static functions

Visual Studio Integration

Fixed a problem that the wrong Language Service was selected when XSharp and Vulcan.NET were used in the same Visual Studio and when files were opened from the output window or the Find Results window

Fixed some problems with 'abnormal' line endings in generated code

Fixed a problem in the Class Library template

Fixed a problem with non standard command lines to Start the debugger

Changes in 0.2.6


Added alternative syntax for event definition. See EVENT keyword in the documentation

Added Code Block Support

Implemented /vo13 (VO compatible string comparisons)

Added support for /vo4 (VO compatible implicit numeric conversions)

Aliased expressions are now fully supported

Fixed a problem with the &= operator

Fixed several crashes for incorrect source code.

Fixed several problems related to implicit conversions from/to usual, float and date

Indexed properties (such as String:Chars) can now be used by name

Indexed properties can now have overloads with different parameter types

Added support for indexed ACCESS and ASSIGN

Fixed a problem when calling Clipper Calling Convention functions and/or methods with a single parameter

Fixed a crash with defines in the preprocessor

_CODEBLOCK is now an alias for the CODEBLOCK type

Fixed a crash for properties defined with parentheses or square brackets, but without actual parameters

Visual Studio Integration

Completed support for .designer.prg for Windows.Forms

Fixed an issue in the CodeDom generator for generating wrappers for Services

The XSharp Language service will no longer be used for Vulcan PRG files in a Side by Side installation

Editor performance for large source files has been improved.

All generated files are now stored in UTF, to make sure that special characters are stored correctly. If you are seeing warnings about code page conversions when generating code, then save files as UTF by choosing "File - Advanced Save Options", and select a Unicode file format, from the Visual Studio Menu.

Changes in 0.2.51

Visual Studio Integration & Build System

The Native Resource compiler now "finds" header files, such as "VOWin32APILibrary.vh" in the Vulcan.NET include folder. Also the output of the resource compiler is now less verbose when running in "normal" message mode. When running in "detailed" or "diagnostics" mode the output now also includes the verbose output of the resource compiler.


Fixed a problem that would make PDB files unusable

The error "Duplicate define with different value" (9012) has been changed to warning, because our preprocessor does a textual comparison and does not "see" that "10" and "(10)" are equal as well as "0xA" and "0xa". It is your responsibility of course to make sure that the values are indeed the same.

Exponential REAL constants were only working with a lower case 'e'. This is now case insensitive

Made several changes to the _DLL FUNCTION and _DLL PROCEDURE rules for the parser. Now we correctly recognize the "DLL Hints " (#123) and also allow extensions in these definitions. Ordinals are parsed correctly as well, but produce an error (9018) because the .Net runtime does not support these anymore. Also the Calling convention is now mandatory and the generated IL code includes SetLastError = true and ExactSpelling = true.

Fixed a problem with the ~ operator. VO and Vulcan (and therefore X#) use this operator as unary operator and as binary operator.
The unary operator does a bitwise negation (Ones complement), and the binary operator does an XOR.
This is different than C# where the ~ operator is Bitwise Negation and the ^ operator is an XOR (and our Roslyn backend uses the C# syntax of course).

Changes in 0.2.5

Visual Studio Integration

Fixed a problem where the output file name would contain a pipe symbol when building for WPF

Fixed a problem with the Item type for WPF forms, pages and user controls

The installer now has an option to not take away the association for PRG, VH and PPO items from an installed Vulcan project system.

Added support for several new item types in the projects

Added support for nested items

Added several item templates for WPF, RC, ResX, Settings, Bitmap, Cursor etc.

Build System

Added support for the new /vo15 command line switch.

Added support for compiling native resources.


A reference to VulcanRT and VulcanRTFuncs is now mandatory when compiling in VO/Vulcan dialect

Added support for indexed access for VO/Vulcan Arrays

Added support for VO/Vulcan style Constructor chaining (where SUPER() or SELF() call is not the first call inside the constructor body)

Added support for the &() macro operator in the VO/Vulcan dialect

Added support for the FIELD statement in the VO/Vulcan dialect

oThe statement is recognized by the compiler

oFields listed in the FIELD statement now take precedence over local variables or instance variables with the same name

Added support for the ALIAS operator (->) in the VO/Vulcan dialect, with the exception of the aliased expressions (AREA->(<Expression>))

Added support for Late bound code (in the VO/Vulcan dialect)

oLate bound method calls

oLate bound property get

oLate bound property set

oLate bound delegate invocation

Added a new /vo15 command line option (Allow untyped Locals and return types):
By default in the VO/Vulcan dialect missing types are allowed and replaced with the USUAL type.
When you specify /vo15- then untyped locals and return types are not allowed and you must specify them.
Of course you can also specify them as USUAL

The ? and ?? statement are now directly mapped to the appropriate VO/Vulcan runtime function when compiling for the VO/Vulcan dialect

We now also support the VulcanClassLibrary attribute and VulcanCompilerVersion attribute for the VO & Vulcan dialect.
With this support the Vulcan macro compiler and Vulcan Runtime should be able to find our functions and classes

The generated static class name is now more in par with the class name that Vulcan generates in the VO & Vulcan dialect.

Added several implicit conversion operations for the USUAL type.

When accessing certain features in the VO & Vulcan dialect (such as the USUAL type) the compiler now checks to see if VulcanRTFuncs.DLL and/or VulcanRT.DLL are included.
When not then a meaningful error message is shown.

Added support for the intrinsic function _GetInst()

Fixed a problem with case sensitive namespace comparisons

Fixed a problem with operator methods

Added preprocessor macros __DIALECT__, __DIALECT_CORE__, __DIALECT_VO__ and __DIALECT_VULCAN__

The _Chr() pseudo function will now be mapped to the Chr() function

Added support for missing arguments in arguments lists (VO & Vulcan dialect only)

Fixed a crash when calculating the position of tokens in header files

The installer now offers to copy the Vulcan Header files to the XSharp Include folder

Added support for skipping arguments in (VO) literal array constructors


Added the XSharp documentation to the Visual Studio Help collection

Added reference documentation for the Vulcan Runtime

Changes in 0.2.4

Visual Studio Integration

Double clicking errors in the error browser now correctly opens the source file and positions the cursor

Fixed several problems in the project and item templates

The installer now also detects Visual Studio 15 Preview and installs our project system in this environment.

Build System

Fixed a problem with the /unsafe compiler option

Fixed a problem with the /doc compiler option

Treat warnings as error was always enabled. This has been fixed.


Added support for Lambda expressions with an expression list

LOCAL dfunc AS System.Func<Double,Double>

dfunc := {|x| x := x + 10, x^2}

? dfunc(2)

Added support for Lambda expressions with a statement list

 LOCAL dfunc AS System.Func<Double,Double>

 dfunc :=        {|x|

                         ? 'square of', x

                         RETURN x^2


Added support for the NAMEOF intrinsic function



 IF String.IsNullOrEmpty(cFirstName)

         THROW ArgumentException{"Empty argument", nameof(cFirstName)}


Added support for creating methods and functions with Clipper calling convention (VO and Vulcan dialect only)

Using Statement now can contain a Variable declaration:

Instead of:

    VAR ms := System.IO.MemoryStream{}


         // do the work



You can now write

 BEGIN USING VAR ms := System.IO.MemoryStream{}

         // do the work


Added support for /vo10 (Compatible IIF behavior). In the VO and Vulcan dialect the expressions are cast to USUAL. In the core dialect the expressions are cast to OBJECT.

New language features for the VO and Vulcan dialect

Calling the SELF() or SUPER() constructor is now allowed anywhere inside a constructor (VO and Vulcan dialect only). The Core dialect still requires constructor chaining as the first expression inside the constructor body

Added support for the PCOUNT, _GETFPARAM and _GETMPARAM intrinsic functions

Added support for String2Psz() and Cast2Psz()

Added support for BEGIN SEQUENCE … END

Added support for BREAK

Fixed several problems:

Nested array initializers

Crash for BREAK statements

Assertion error for generic arguments

Assertion on const implicit reference

Allow ClipperCallingConvention Attribute on Constructors, even when it is marked as ‘for methods only’

Fixed a problem with Global Const declarations

__ENTITY__ preprocessor macro inside indexed properties

Changes in 0.2.3

Visual Studio Integration

We have changed to use the MPF style of Visual Studio Integration.

We have added support for the Windows Forms Editor

We have added support for the WPF Editor

We have added support for the Codedom Provider, which means a parser and code generator that are used by the two editors above

The project property pages have been elaborated. Many more features are available now.

We have added several templates

Build System

Added support for several new commandline options, such as /dialect

The commandline options were not reset properly when running the shared compiler. This has been fixed.

The build system will limit the # of errors passed to Visual Studio to max. 500 per project. The commandline compiler will still show all errors.


We have started work on the Bring Your Own Runtime support for Vulcan. See separate heading below.

The __SIG__ and __ENTITY__ macros are now also supported, as well as the __WINDIR__, __SYSDIR__ and __WINDRIVE__ macros

The debugger instructions have been improved. You should have a much better debugging experience with this build

Several errors that indicated that there are visibility differences between types and method arguments, return types or property types have been changed into warnings. Of course you should consider to fix these problems in your code.

The #Error and #warning preprocessor command no longer require the argument to be a string

The SLen() function call is now inlined by the compiler (just like in Vulcan)

The AltD() function will insert a call to "System.Diagnostics.Debugger.Break" within a IF System.Diagnostics.Debugger.IsAttached check

Several compiler crashes have been fixed

Added support for the PARAMS keyword for method and function parameters.

Fixed a problem for the DYNAMIC type.


XBase type names are resolved properly (ARRAY, DATE, SYMBOL, USUAL etc)

Literal values are now resolved properly (ARRAY, DATE, SYMBOL)

NULL_ literals are resolved properly (NULL_STRING follows the /vo2 compiler option, NULL_DATE, NULL_SYMBOL)

The /vo14 compiler option (Float literals) has been implemented

The compiler automatically inserts a "Using Vulcan" and "using static VulcanRtFuncs.Functions" in each program

You MUST add a reference to the VulcanRTFuncs and VulcanRT assembly to your project. This may be a Vulcan 3 and also a Vulcan 4 version of the Runtime. Maybe Vulcan 2 works as well, we have not tested it.

Calling methods with Clipper calling convention works as expected.

Methods/Functions without return type are seen as methods that return a USUAL

If a method/function contains typed and typed parameters then the untyped parameters are seen as USUAL parameters

Methods with only untyped parameters (Clipper calling convention) are not supported yet

The ? command will call AsString() on the arguments

Changes in 0.2.2

Visual Studio Integration

Added more project properties. One new property is the "Use Shared Compiler" option. This will improve compilation speed, but may have a side effect that some compiler (parser) errors are not shown in details.
If you experience this, then please disable this option.

Added more properties to the Build System. All C# properties should now also be supported for X#, even though some of them are not visible in the property dialogs inside VS.

Added a CreateManifest task to the Build System so you will not get an error anymore for projects that contain managed resources

The performance of the editor should be better with this release.

Marking and unmarking text blocks as comment would not always be reflected in the editor colors. This has been fixed.


We have added a first version of the preprocessor. This preprocessor supports the #define command, #ifdef, #ifndef, #else, #endif, #include, #error and #warning. #command and #translate (to add user defined commands) are not supported yet.

Missing types (in parameter lists, field definitions etc) were sometimes producing unclear error messages. We have changed the compiler to produce a "Missing Type" error message.

We rolled the underlying Roslyn code forward to VS 2015 Update 1. Not that you see much of this from the outside <g>, but several fixes and enhancements have made their way into the compiler.

Added a YIELD EXIT statement (You can also use YIELD BREAK).

Added an (optional) OVERRIDE keyword which can be used as modifier on virtual methods which are overridden in a subclass.

Added a NOP keyword which you can use in code which is intentionally empty (for example the otherwise branch of a case statement. The compiler will no longer warn about an empty block when you insert a NOP keyword there.

The On and Off keywords could cause problems, because they were not positional (these are part of the pragma statement). This has been fixed.

_AND() and _OR() expressions with one argument now throw a compiler error.

The compiler now recognizes the /VO14 (store literals as float) compiler switch (it has not been implemented yet).

Added a ** operator as alias for the ^ (Exponent) operator.

Added an "unsupported" error when using the Minus operator on strings.

Fixed a "Stack overflow" error in the compiler that could occur for very long expressions.

The right shift operator no longer conflicts with two Greater Than operators, which allows you to declare or create generics without having to put a space between them.
(var x := List<Tuple<int,int>>{}

Changes in 0.2.1

Visual Studio Integration

Added and improved several project properties

Fix a problem with the "Additional Compiler Options"

Improved coloring in the editor for Keywords, Comments etc. You can set the colors from the Tools/Options dialog under General/Fonts & Colors. Look for the entries with the name "XSharp Keyword" etc.

Added Windows Forms Template


Several errors have been demoted to warnings to be more compatible with VO/Vulcan

Added support for Comment lines that start with an asterisk

Added support for the DEFINE statement. For now the DEFINE statement MUST have a type

Fixed problem with Single Line Properties with GET and SET reversed

Several fixes for Virtual and Non virtual methods in combination with the /VO3 compatibility option

Changes in 0.1.7

The "ns" (add default namespace to classes without namespace) has been implemented

The "vo3" compiler option (to make all methods virtual ) has been implemented

Fixed an issue where the send operator on an expression between parentheses was not compiling properly

Relational operators for strings (>, >=, <, <=) are now supported. They are implemented using the String.Compare() method.

Fixed a problem with local variables declared on the start line from FOR .. NEXT statements

Added first version of the documentation in CHM & PDF format

Added several properties to the Visual Studio Project properties dialog to allow setting the new compiler options

Fixed a problem in the Targets files used by MsBuild because some standard macros such as $(TargetPath) were not working properly

XIDE 0.1.7 is included. This version of XIDE is completely compiled with XSharp !

The name of some of the MsBuild support files have changed. This may lead to problems loading a VS project if you have used the VS support from the previous build. If that is the case then please edit the xsproj file inside Visual Studio and replace all references of "XSharpProject" with "XSharp" . Then safe the xsproj file and try to reload the project again

The WHILE.. ENDDO (a DO WHILE without the leading DO) is now recognized properly

Changes in 0.1.6

This version now comes with an installer

This version includes a first version of the Visual Studio Integration. You can edit, build, run and debug inside Visual Studio. There is no "intellisense" available.

The compiler now uses 1-based arrays and the “az” compiler option has been implemented to switch the compiler to use 0-based arrays.

The "vo2" compiler option (to initialize string variables with String.Empty) has been implemented

Please note that there is no option in the VS project properties dialog yet for the az and vo2 compiler options. You can use the "additional compiler options" option to specify these compiler options.

The text "this" and "base" in error messages has been changed to "SELF" and "SUPER"

Error of type “visibility” (for example public properties that expose private or internal types) have been changed to warnings

Fixed a problem with TRY … ENDTRY statements without CATCH clause

The compiler now has a better resolution for functions that reside in other (X#) assemblies

Fixed a problem which could lead to an "ambiguous operator" message when mixing different numeric types.

Changes in 0.1.5

When an error occurs in the parsing stage, X# no longer enters the following stages of the compiler to prevent crashes. In addition to the errors from the parser also an error 9002 is displayed.

Parser errors now also include the source file name in the error message and have the same format as other error messages. Please note that we are not finished yet with handling these error messages. There will be improvements in the format of these error messages in the upcoming builds.

The compiler will display a “feature not available” (8022) error when a program uses one of the Xbase types (ARRAY, DATE, FLOAT, PSZ, SYMBOL, USUAL).

Fixed an error with VOSTRUCT and UNION types

Fixed a problem with the exclamation mark (!) NOT operator

Changes in 0.1.4

Several changes to allow calculations with integers and enums

Several changes to allow VO compatible _OR, _AND, _NOT an _XOR operations

Fix interface/abstract VO properties

Insert an implicit “USING System” only if not explicitly declared

Error 542 turned to warning (members cannot have the same name as their enclosing type)

Changes in the .XOR. expression definition

Fix double quote in CHAR_CONST lexer rule

Allow namespace declaration in class/struct/etc. name (CLASS Foo.Bar)

Fix access/assign crash where identifier name was a (positional) keword: ACCESS Value

Preprocessor keywords were not recognized after spaces, but only at the start of the line. This has been fixed.

Prevent property GET SET from being parsed as expression body

Fix default visibility for interface event

Unsafe errors become warnings with /unsafe option, PTR is void*

Fix dim array field declaration

Initial support of VO cast and VO Conversion rules (TYPE(_CAST, Expression) and TYPE(Expression)). _CAST is always unchecked (LONG(_CAST, dwValue)) and convert follows the checked/unchecked rules (LONG(dwValue))

Fixed problem with codeblock with empty parameter list

Fixed problems with GlobalAttributes.

An AUTO property without GET SET now automatically adds a GET and SET block

Allow implicit constant double-to-single conversion

Changes in 0.1.3

Change inconsistent field accessibility error to warning and other similar errors

Added commandline support for Vulcan arguments. These arguments no longer result in an error message, but are not really implemented, unless an equivalent argument exists for the Roslyn (C#) compiler. For example: /ovf and /fovf are both mapped to /checked, /wx is mapped to /warnaserror. /w should not be used because that has a different meaning /warning level). /nowarn:nnnn should be used in stead

Fixed problem where the PUBLIC modifier was assigned to Interface Members or Destructors

Prevent expression statements from starting with CONSTRUCTOR() or DESTRUCTOR()

Added support for ? statement without parameters

The default return type for assigns is now VOID when not specified

Added support for “old Style” delegate instantiation

Added support for Enum addition

Added an implicit empty catch block for TRY .. END TRY without catch and finally

Added support for the DESCENDING keyword in LINQ statements

Added support for VIRTUAL and OVERRIDE for Properties and Events

Prevent implied override insertion for abstract interface members

Fixed a problem where System.Void could not be resolved

Fixed problem with Property Generation for ACCESS/ASSIGN

Fixed problem with Abstract method handling

Changes in

Added default expression

Fixed problem with events

Fixed some small lexer problems

Fixed problem with _DLL FUNCTION and _DLL PROCEDURE

Changes in 0.1.2

Fixed problem with handling escape sequences in extended strings

Fixed issue in FOR.. NEXT statements

Fixed a problem with SWITCH statements

Fixed a problem with the sizeof() operator

Fixed a problem in the REPEAT .. UNTIL statement

Fixed a problem in TRY .. CATCH .. FINALLY .. END TRY statements.

Fixed issue in Conditional Access Expression ( Expr ? Expr)

Allow bound member access of name with type args

Fixed problem in LOCAL statement with multiple locals

Fixed a problem when compiling with debug info for methods without a body

Optimized the Lexer. This should increase the compile speed a lot

Fixed a problem in the code that reports that a feature is not supported yet

Fixed a problem when defining Generic types with a STRUCTURE constraint

Compiler macros (__ENTITY__, __LINE__ etc) were causing a crash. For now the compiler inserts a literal string with the name of the macro.

Build 0.1.1 did not contain XSC.RSP

Fixed a problem where identifiers were not recognized when they were matching a (new) keyword