Page 1 of 1

UndefineStructure, UndefineConstant

Posted: Sun Mar 03, 2013 5:59 pm
by Toni6
It would be quite useful to have these 2 features available in certain situations/projects.

Example - UndefineStructure:

Code: Select all

Structure PB_Default_Player
  var1.l
  var2.f
EndStructure

CompilerIf Defined(PB_Default_Player, #PB_Structure)
  UndefineStructure PB_Default_Player
  
  Structure PB_Default_Player
    score.l
    pos.f
  EndStructure
CompilerEndIf
Example - UndefineConstant:

Code: Select all

#SOME_CONSTANT = 9

CompilerIf Defined(#SOME_CONSTANT, #PB_Constant)
  UndefineConstant SOME_CONSTANT
  
  #SOME_CONSTANT = 33
CompilerEndIf