User Tools

Site Tools


vulcan:defines

This is an old revision of the document!


Define

When it comes to defines, unfortunately Vulcan.NET is not compatible to VO, and X# has returned to VO compatibility.

In VO, you can define

define my_define := 255

in any of your libraries and this define is like a global variable that is available in all depending code. When Vulcan was developed, the development team opted for a more C like syntax:

#define my_define 255

and this define is visible only in the prg files that has this definition inside, either directly or with an include. But includes can have the problem that you can redefine them or have different defines with the same name and different content. The X# team instead adopted the VO syntax, using the define again as a sort of global variable. This will let you compile VO code without warnings, but can give some warnings on Vulcan code. In X#, these to are different even if they are similar:

#define my_define 255
define my_define := 255

The first is a define like Vulcan or C/C++/C#, the second one instead is like in VO.

When migrating code from Vulcan.NET to X#, it is a good idea to change all #define statements to define statements and put them in some library instead of include files, and remove the includes.

If you are using the VO compatible class libraries and therefore need the defines from the VO SDK, you should include the library SDK_DEFINES.dll to your application. You can find this in your VO Xporter folder, probably in the C:\Program Files (x86)\XSharp\VOXPorter folder.

vulcan/defines.1527575101.txt.gz · Last modified: 2018/05/29 06:25 by wolfgangriedmann