case

Command: case


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
Author
Gewaltig
Synopsis
bool proc case --> proc
-
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

File
sli/slicontrol.h
Remarks
Use exit to make sure that switch is exited.