| Group: | Flow Control |
| See also: | switch case break endsw |
| Function: | default | |
| Description: |
When the program's counter comes inside a switch construct to the keyword default, the following commands are processed in any case. A default statement can be finished by the keyword break, but does not have to.
|
| Usage: | switch case (cond) break default endsw | |
proc (y) = sign (x)
switch
case (x<0) y = -1 break
case (x>0) y = 1 break
default y = 0 break ; this break has no effect
endsw
endp
sign(-eh)
Contents of y [1,] -1
| Group: | Flow Control |
| See also: | switch case break endsw |