Command: case

NEST HelpDesk Command Index NEST Quick Reference

Name:
 case - like if, but test a series of conditions.
Synopsis:
 bool proc case --> proc
                              -
Description:
   case tests the bool and pushes proc if true, else does nothing.
Parameters:
   bool : condition for case to test
   proc : procedure to be executed if case is true
Examples:

   true {(hello) ==} case --> hello
   false {(hello) ==} case --> -

   1 0 gt {(1 bigger than 0) ==} case --> 1 bigger than 0
   1 0 lt {(0 bigger than 1) ==} case --> -

   mark
     false {1 == exit} case
     false {2 == exit} case
     true  {3 == exit} case
     false {4 == exit} case
   switch
   --> 3

Author:
 Gewaltig
FirstVersion:
 ??
Remarks:
 Use exit to make sure that switch is exited.
SeeAlso:switch switchdefault exit mark if
Source:
 /home/abuild/rpmbuild/BUILD/nest-2.4.1/sli/slicontrol.h

NEST HelpDesk Command Index NEST Quick Reference

© 2000-2010 The NEST Initiative