Changes between Version 22 and Version 23 of LanguageChanges


Ignore:
Timestamp:
Jan 25, 2007, 4:12:51 PM (15 years ago)
Author:
Rafael de Pelegrini Soares
Comment:

Improved switch command

Legend:

Unmodified
Added
Removed
Modified
  • LanguageChanges

    v22 v23  
    175175    case "closed":
    176176       flow = 0 * "mol/h";
    177        change to "opened" if P > 2*"atm";
     177       when P > 2*"atm" switchto "opened";
    178178    case "opened":
    179179       flow = k*sqrt(P - Pout);
    180        change to "closed" if P < Pout;
     180       when P < Pout*1.1 switchto "closed";
    181181    end
    182182    ...
     
    188188 * The '''Switcher''' type has an extra attribute called '''Valid''' which are the valid values for the switcher
    189189 * There is a '''switch''' command which can be used in the EQUATIONS
    190  * There is a '''change to''' command which can be used inside a '''case''' of a '''switch'''. NOTE: the '''change to''' command is optional, if the '''change to''' command is missing then the '''case''' is a '''black hole''': there is no way to get out! :)
     190 * There is a '''when''' ... '''switchto''' command which can be used inside a '''case''' of a '''switch'''. NOTE: the '''when''' command is optional, however if this command is missing then the '''case''' is a '''black hole''': there is no way to get out! :)
    191191
    192192||Who || Opinion || Why ||