Announcement
Collapse
No announcement yet.
Backward incompatibility?
Collapse
X
-
It's just as well that that it's only pre-defined constants. Otherwise you could inadvertently redefine some equate you forgot you had used and buried deep down in some #INCLUDE file.
That's why I use #IF %DEF(%equate_name) a lot. Very handy.
Still waiting (apparently) for support for '%Def (procedure_name)' but setting my own equates and using %DEF(%equate_meaning_procedure_name_is_defined) works OK.
#UNDEF and/or #REDEF would still be useful.
MCM
Leave a comment:
-
-
which is pre-defined in the compiler
Well, that's only my second mistake, first since 1962.
Glad somebody caught it.
Leave a comment:
-
-
I would consider a slight language rewrite as follows:
The value of any numeric equate or string equate which is pre-defined in the compiler may overridden if the new assignment is performed before the equate is referenced in the program
Leave a comment:
-
-
Just to be clear the help file notes (What's New, Additional Changes), an equate (constant) that can be re-defined before use is one "which is pre-defined in the compiler"
Here's the complete change remark:
Any numeric equate or string equate which is pre-defined in the compiler may be assigned a revised value if the new assignment is performed before the equate is referenced in the program
Leave a comment:
-
-
They need to be defined prior to being referenced.
Leave a comment:
-
-
Looks like only subs/functions can be forward referenced, right? I tried a quick test to see if equates and types could be forward referenced and I don't think they can. They need to be defined prior to being referenced. Am I correct in saying that?
Leave a comment:
-
-
Yes it's a new restriction due to the forward-referencing feature.
Simply move the constant(s) outside of a FUNCTION or SUB and the code will compile fine.
Leave a comment:
-
-
Backward incompatibility?
Compiles In PBWin 8 but Not In PBWin 9
Error 543 - Must be outside Sub/Function
'Code:#Compile Exe #Include "WIN32API.INC" Sub test_Include %Top = %MB_TASKMODAL 'keep for older msgbox msgs End Sub Function PBMain Call test_Include ? "Worked" End Function '
Tags: None
-
Leave a comment: