Please enable JavaScript to view this site.

A-Shell Development History

Navigation: Version 5.1/6.0, builds 1100-1271 > 1125 – 27 Sep 08

Nested ELSEIF Clauses

Scroll Prev Top Next More

One or more ELSEIF clauses may now 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.