I want to check the existence of a label when creating an object
while the label is defined inside the module itself, it is not inside a procedure of the module
(in fact it is , I can assign it with ?Label, but the function Defined(Label, #PB_Label) says it's not)
I tested on both Windows and MacOS with the same result
here is some test code:
Code: Select all
DeclareModule Object
Declare Test()
DataSection
ObjectVT:
EndDataSection
Macro INI(obj)
CompilerIf Defined(obj#VT, #PB_Label)
Debug "LABEL FOUND"
CompilerElse
Debug "LABEL NOT FOUND"
CompilerEndIf
EndMacro
EndDeclareModule
Module Object
INI(Object)
Debug ?ObjectVT
Procedure Test()
INI(Object)
Debug ?ObjectVT
EndProcedure
EndModule
Object::Test()
Is it a bug or normal behavior?LABEL FOUND
5368956240
LABEL NOT FOUND
5368956240