My app has a MACRO that begins:
MACRO FUNCTION ScanUDTbyNumericMember(arrayname,memberID,target)
MacroTemp q, hit
hit = -1
...
END MACRO = hit
It compiled and ran just fine in PBWIN, but in FF, I kept getting Error 519, Missing Declaration: HIT0001.
So I added:
LOCAL hit0001 As Long
Then it gave me the same error for : Q0001
It wouldn't compile in FF until I explicitly added:
LOCAL hit0001 As Long, q0001 As Long
With them declared, it compiled and ran OK...
What does FF not like about the MICROTEMP declarations??
Good question. Possible that the FireFly parser is picking up the "Macro" part of the "MarcoTemp" and thinking that it is part of a new Marco. Obviously, FireFly should be looking for "Macro " <--- note the space. I will check the parser tomorrow to see if that is indeed the case.
Quote from: TechSupportGood question. Possible that the FireFly parser is picking up the "Macro" part of the "MarcoTemp" and thinking that it is part of a new Marco. Obviously, FireFly should be looking for "Macro " <--- note the space. I will check the parser tomorrow to see if that is indeed the case.
Prior to the macro in question, I have two other macros, and each has a MACROTEMP line that has compiled without problem...
I've tried changing "macrotemp" to "macro temp" but no good - FF reports a missing END MACRO...
Interestingly, I commented out the macrotemp line, and declared
LOCAL hit, q
just before the location that the macro would be substituted.
I figured that the post-substitution code would use the variable from the mainline code. It worked. It just doesn't resolve the problem...
From my understanding of Macros shouldn't your code be:
MACRO FUNCTION ScanUDTbyNumericMember(arrayname,memberID,target)
MacroTemp q, hit
Dim q&, hit& <----missing declaration
hit = -1
...
END MACRO = hit
Hope that helps.
Quote from: Sean RoeFrom my understanding of Macros shouldn't your code be:
MACRO FUNCTION ScanUDTbyNumericMember(arrayname,memberID,target)
MacroTemp q, hit
Dim q&, hit& <----missing declaration
hit = -1
...
END MACRO = hit
Hope that helps.
Thanks for the thought, but that gives Error 474, Invalid Name: hit&
Our two prior messages cross-posted. I have other macros that use macrotemp and are OK...
Quote from: Sean RoeFrom my understanding of Macros shouldn't your code be:
MACRO FUNCTION ScanUDTbyNumericMember(arrayname,memberID,target)
MacroTemp q, hit
Dim q&, hit& <----missing declaration
hit = -1
...
END MACRO = hit
Hope that helps.
I initially mis-read your post! I thought you were indicating to just add the identifier. I didn't see the DIM line...
Yes, you're right - I added the declaration line and it's OK.
I forgot to add it into the macro definition because I had already declared those variables as LOCAL in the code just before the point the substitution would occur...
I didn't realize the parsers/compilers cared where the variables were declared, as long as (after the text substitution), it was all accounted for...
Thanks!!!
-John
You're welcome and thanks for the response.