Back to SPR List Previous Next
Old quirks with semicolon multi-statements fixed
Minor Closed - Fixed Found:2002.20.35 14 AUG 2004 Fixed:2002.20.36 15 AUG 2004

DETAILS
 PROGRAM;WRITE "Hello World";END PROGRAM
 gives you an error 453 (about a multi-statement "IF")
 There are a few quirks and inconsistancies in this area. These are not
 serious bugs and have been around for a while. They may become more of an
 issue because of embedded multi-statements in PQLForms.
EXAMPLE PROGRAM
 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.
WORKAROUND
Back to SPR List Previous Next