User Tools

Site Tools


define

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
define [2018/06/08 05:46] wolfgangriedmanndefine [2019/08/21 06:02] (current) wolfgangriedmann
Line 11: Line 11:
 <code>define MyVODefine := 123 // VO style, globally visible <code>define MyVODefine := 123 // VO style, globally visible
 #define MyVulcanDefine 123  // Vulcan style, replaced by the compiler</code> #define MyVulcanDefine 123  // Vulcan style, replaced by the compiler</code>
 +
 +Please note that in the current X# version (2.0.4.0 aka Bandol GA) the #ifdef/#ifndef statement does not sees the VO style define, but only the #define, so you have to work eventually with include files.
  
 Why X# has been returned to the VO style has been explained by Robert v.d.Hulst: Why X# has been returned to the VO style has been explained by Robert v.d.Hulst:
  
 //For me the most important reason to switch back from #define to DEFINE is the way it was implemented and the consequences of this implementation. //For me the most important reason to switch back from #define to DEFINE is the way it was implemented and the consequences of this implementation.
-In Vulcan the preprocessor (and the X# preprocessor well) do a "dumb" Search and Replace for defines and this has unwanted side effects.+In Vulcan the preprocessor (and the X# preprocessor as well) do a "dumb" Search and Replace for defines and this has unwanted side effects.
 Consider the following code:// Consider the following code://
  
define.txt · Last modified: 2019/08/21 06:02 by wolfgangriedmann