hello, please, how to check if a local variable is "EMPTY" ?
for example, if a soubroutine requires a parameter, and if that parameter is not specified at the CALL statement, how to check if the parameter is missing ( inside the soubroutine ) ?
the soubroutine from the shared code should perform well at block N1, and raise an error at block N2, because there is no LV01 at N2
... but in reality i receive an error the 1st time i call the soubroutine, at the line inside the soubroutine : "IF [ LV01 NE EMPTY ] NJUMP"
lathe :
... images 1, 2
... seems like the controller considers EMPTY as a local variable, and gives an error because it has more than 4 chars
mill :
... images 3, 4
... controller sais that the local variable used is not registered; i guess it is refering to EMPTY as being a not-registered local variable
please, how to handle this case ? kindly
Code:
N1 CALL OS01 LV01 = 1
N2 CALL OS01
M02
OS01
IF [ LV01 NE EMPTY ] NJUMP
NLOOP M0 ( missing parameter )
GOTO NLOOP
NJUMP LV01 = LV01 + 1
RTS