KRASCHE
&
BYRNE
         ELZED  HOME       NEWS       DOCS       DOWNLOADS       LICENSING       SUPPORT       FAQ       ABOUT  US

What's An Elzed?
Features
Licensing
Downloads
Documentation
Elzed News
    ELZED 
 Features 

Flow Control

Sometimes a calculation can't be based on a single formula, or is dependent on multiple conditions. To get to an answer, you'll have to create an algorithm. For example, let's say your calculation is dependent on three variables: A, B, and C. The typical parsing library would have you write an expression like this:

 IFF( A>=0, IFF( B<0, TRUE, FALSE ), IFF( C==0, FALSE, TRUE ) );

Elzed, however, supports a well-rounded set of flow control operators, and would let you write the above expression like this:

 if ( A>=0 ) then
  if ( B<0 ) then
   return true;
  else
   return false;
  end;
 else if ( C==0 ) then
   return false;
  else
   return true;
  end;
 end;

To give you an even better example, the Elzed sample code package contains a version of the Life Game implemented as an Elzed expression. Check it out.



  Copyright  ©  MMXXIV  by  R R Le Cropane   •   All Rights Reserved   •   Terms of Use   •   Privacy Policy