1) a)PROGRAM;BEEP;END PROGRAM
b)PROGRAM;WRITE "1";END PROGRAM
and more give error messages about multi-statement "IF" - but there are
no IFs
2) a)PROGRAM;IF (1 EQ 1) COMPUTE A = 1;END PROGRAM
does *not* give you an error but it *does* contain a multi-statement IF
3) if the member F.M contains WRITE "Hello World" then:
a)PROGRAM;IF (1 EQ 1) CALL F.M
will write "Hello World" and
b)PROGRAM;IF (1 EQ 2) CALL F.M
will not write "Hello World"
(The documentation says that this is not allowed).
c)PROGRAM;WRITE "Message follows:"; CALL F.M
will write the two expected lines.
4) if the member F.M does not exist then you get the messages
Member not found. (Error 446 - M)
Statement not allowed on multi-statement "IF". (Error 453)
when running each of the examples above (even the one without the IF).
5) a)PROGRAM;IF (1 EQ 2); GLOBAL GLOB = "TEST"
Gives the expected multi-statement "IF" error
b)PROGRAM;IF (1 EQ 2); COMPUTE A = 1; GLOBAL GLOB = "TEST"
Gives the execution error Unknown stack command code. (Error 758)
6) RETRIEVAL
IF (1 EQ 1) COMPUTE A =1 ; PROCESS RECORD 1;WRITE ALL;END RECORD
Gives the correct error message 453 - it is not tricked.
RETRIEVAL
WRITE ID ; PROCESS RECORD 1;GET VARS ALL;WRITE ALL;END RECORD
Runs and gives expected results.
|