SBASIC only: EXecute the following program:
Code: Select all
100 ch = FOPEN("con"): CLS#ch
110 test ch, 1
120 PAUSE#ch
130 CLOSE#ch
140 :
150 DEFine PROCedure test(ch, a)
160 PRINT#ch; a
180 END DEFine test
At line 150:4 DEFines may not be within other clauses
However there are various error conditions depending on how the program
is constructed. In the worst case it just hangs and must be RJOBed.
What seems to get the interpreter's knickers in a twist is a parameter
being referenced using the same name as the parameter, 'ch' in this case.
This is supposed to be perfectly "legal". I dont know when this behaviour
started but Ive noticed it for a while.