Differences between VO and Vulcan dialect

We sometimes get a question about the differences between the VO and Vulcan dialect.

In the table below we have tried to list these differences

DescriptionVOVulcan
Keyword abbreviations Supported for all 'old' keywords for 4 letters or more. See table on https://www.xsharp.info/help/x-keywords.html. All the keywords in the VO column may be abbreviated. Only supported for
PROCEDURE (PROC)
FUNCTION (FUNC)
LONGINT (LONG)
SHORTINT (SHORT)
String literals String literals can be defined with single quotes and double quotes:
"This is a string"
'This is a string with an embedded double quote "'
String literals can only be defined with double quotes
Char literals Must use single quotes prefixed with 'c', e.g. c'A' Single quotes, the 'c' prefix is optional, e.g. 'A'  and also c'A'
PSZ indexer PSZ indexing is 1 based PSZ indexing is 0 based (this is actually a bug in Vulcan that we are emulating)
MemVars (PUBLIC, PRIVATE) Yes (in a future release) No
Single line comments Uses both // and && Only // is supported.
&& is a synonym for .AND.
Compiler macros defines __DIALECT_VO__ and __VO__ defines __DIALECT_VULCAN__ and __VULCAN__

Something else that needs to be mentioned: if you switch from the Vulcan runtime to the X# runtime, please remember to remove the #include statements for the Vulcan header files, such as VOWIn32ApiLibrary.vh)

The values in these header files are now stored as defines (constants) in the VO SDK assemblies, such as VOWin32APILibrary.dll and also in the runtime assemblies (for values from VOSystemLibrary.vh).
Removing the header files will most likely improve the compilation speed.


4 comments

  • Very interesting. It raises the question how you create a string with quotes embedded in Vulcan, like in the sample left?
  • Dick,
    using the extended string syntax (which is like the normal C# string syntax but the first double quote is prefixed with an 'e' character)

    e"This is a string with an embedded double quote \""

    The backslash is used as escape character to indicate the the double quote after it is not the end of the string but part of the string.

    Robert
  • Dick,
    thx for the question, made me have a look and so found:
    • there's a page in the help for this,
      that even the bell whistles -> \a works ;)
      i wonder what \v (vertical tab) does
  • [quote name="Karl Faller"]Dick,
    thx for the question, made me have a look and so found:
    • there's a page in the help for this,
      that even the bell whistles -> \a works ;)
      i wonder what \v (vertical tab) does
    [/quote]

    Karl, it just adds a character with an ascii value of 11 ( you can see this by executing ? INT(e"\v":Chars[0]) ) to the string. What does that character actually means depends on the application and how each app wants to translate and use this. Similar with any other character of course.