next up previous contents index
Next: IMPORT Up: SIC Language Internal Help Previous: HELP   Contents   Index


IF

        [SIC\]IF Logical_Expression [THEN]

    Start  a  conditional IF block. The behaviour of IF blocks is similar to
    structured Fortran. Any text following the  logical  expression  is  ig-
    nored, but if this text is not THEN, an error message is produced.

    This  command can only be used within a procedure: interactive users are
    expected to be able to make their decisions themselves.

    There must be no blanks within the logical expression, but composite ex-
    pressions are allowed. Two special logical functions can also be used:
        - EXIST(VarName) Returns .TRUE. if VarName is an existing variable
        -  FILE("String") Returns .TRUE. if String is an existing file. Dou-
            ble quotes protect the case of the  string.  Syntax  FILE("'Var-
            Name'")  allows  to  check  the  string contained in a character
            variable.


Gildas manager 2012-02-08