|
Post by Stefan on Nov 3, 2021 5:44:18 GMT -5
Hi George,
Thank you for the amazing and responsive service, and apologies for being a pain.
SPFLite versions prior to v21306 did not accept a LOCATE :-AA statement, replying with error 'Invalid tag operand'.
In version 21306, a LOCATE :-AA statement either completes successfully or issues message "Bottom of data reached" if no line with that tag exists.
However, if SPF_CMD("LOCATE :-AA") is issued in a macro, and no such line exists, I receive "+Multiple messages were triggered, press (help)... to see them". On pressing HELP, the messages are revealed as
Invalid tag operand RC=8: Bottom of data reached Multiple messages were triggered, press (help)... to see them
So the 'Invalid tag operand' gremlin is still lurking in the shadows someplace.
|
|
|
Post by Stefan on Nov 3, 2021 9:55:24 GMT -5
Hi Robert, The macro in question 'labels' the start of Procedures, Subroutines, Functions, Methods, etc when looking at a file. As such, whatever 'labels' I place in the line-command field must be visible to the user and acceptable to the LOCATE command. At first I did use SPFLite labels (.xx format), but when I extended the macro's functionality to Methods, the 'must be unique' nature of labels is unhelpful. Methods with the same name can exist in different Classes in the the same file. So I switched to tags, as SPFLite allows duplicates of those in a file. That's when I found that the Command Parser allows labels to consist of alphanumerics plus some symbols (e.g. .AB-3# is fine) but only accepts alphanumeric tags. George made a straight-forward change to allow tag names to have the same freedom as label names. The macro is stiil 'Work in Progress', but works well for REXX, BASIC and also CFGMAINT-generated Export files, but as it now uses Tags, you'lll need the v21306 beta to run it. Also, to allow it to work while there are pending line commands, you should add a SET PENDING.LP = Y to SPFLite. For rudimentary description of what it does and command syntax, see the comments within.
PS: I still need to fix the hiccup in lines 356-357 which worked with labels but won't work with tags. :-)
|
|
|
Post by George on Nov 3, 2021 11:33:02 GMT -5
Stefan: Oh what a tangled web .....
Corrected.
Debugging in multi-thread mode is enough to drive anyone crazy. I couldn't figure out who was issuing the Invalid tag message, so I decided to trap it in the message handler and see to which reourine it exited back.
Except when I stepped through the handler exit, it went back to a place that doesn't even call the handler.
Fun! I'll post another Beta.
George
|
|