fbpx

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.

Comments   

#1 Dick 2019-01-11 00:02
Very interesting. It raises the question how you create a string with quotes embedded in Vulcan, like in the sample left?
#2 Robert van der Hulst 2019-01-11 08:55
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
#3 Karl Faller 2019-01-15 19:35
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
#4 Chris Pyrgas 2019-01-16 17:11
Quoting 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


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.

You need to login to post comments on this website.