Search                        Top                                  Index
HELP ELSEIF                                        Steven Hardy Jan 1978

Begins a second (or subsequent) condition in a conditional -if- or
-unless- statement (see *IF and *UNLESS).

-elseif- should not be confused with an -else- followed by an -if-
although it is often used in similar places. The statement:

    if <CONDITION1> then
        <ACTION1>
    elseif <CONDITION2> then
        <ACTION2>
    else
        <ACTION3>
    endif

is equivalent to:

    if <CONDITION1> then
        <ACTION1>
    else
        if <CONDITION2> then
            <ACTION2>
        else
            <ACTION3>
        endif
    endif

Also see:

    *IF             --- Summary of -if- statement usage
    *ELSEUNLESS     --- The use of -elseunless- in conditionals
    *UNLESS         --- Summary of -unless- statement usage
    *CONDITIONALS   --- Summary of conditional statements
    *BOOLEAN        --- Boolean values in POP-11

    REF *SYNTAX *POPSYNTAX
        Summary of POP-11 syntax



--- C.all/help/elseif
--- Copyright University of Sussex 1992. All rights reserved. ----------