Please enable JavaScript to view this site.

ASQL Reference

Navigation: » No topics above this level «

ELSEIF Clauses

Scroll Prev Top Next More

Beginning with A-Shell build 1125 of September 2008, one or more elseif clauses may be inserted into an extended if/elseif/else/endif statement (in /RC or /X:2 modes), e.g.:

IF <expr1> THEN

   <statements>

ELSEIF <expr2> THEN

   <statements>

ELSEIF <expr3> THEN

   <statements>

ELSE

   <statements>

ENDIF

Previously, to accomplish the same thing you would have had to use nested if/else/endif clauses, e.g.:

IF <expr1> THEN

   <statements>

ELSE

   IF <expr2> THEN

      <statements>

   ELSE

      IF <expr3> then    

         <statements>

      ELSE

         <statements>

      ENDIF

   ENDIF

ENDIF

 

The elseif version is mainly just cleaner and easier to follow.