Checking if 'Fired Off From' Nomads

Started by Jeffrey Ferreira, July 14, 2023, 09:17:23 AM

Previous topic - Next topic

Jeffrey Ferreira

Hi All,

So often times we will gosub or perform a routine that is also the code behind a multi-line. For Example CUSTOMER_ID_ENTERED. 

When we want to know if this came from nomads or from code we check ID$="CUSTOMER_ID".
I know it may seem like I'm splitting hairs but i feel this is not 100% foolproof and i have case where I really need to know (was this routine fired off from Nomads via the multi-line)

is there a way i can be 100% sure?

thanks

jeff

Mike King

Jeff

You likely could use TCB( 8 ) to see if there is anything on the GOSUB stack since if the routine is PERFORMED then the GOSUB stack will be empty.

0010 GOSUB test
0020 PERFORM PGN+";test"
0030 GOSUB test2
0040 END
0050 !
0060 test2:
0070 PERFORM PGN+";test"
0080 RETURN
0090 test:
0100 PRINT "TCB ( 8 )=",TCB(8)
0110 RETURN


-:run
TCB ( 8 )= 20
TCB ( 8 )= 0
TCB ( 8 )= 0
-:

Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com

Jeffrey Ferreira