Group: | Flow Control |
See also: | endo until while |
Function: | do | |
Description: |
do starts a loop until the first element of the argument of until is true. do has to be followed by an until.
|
Usage: | do |
proc(j)=factorial(x) if (x>1) j=1 do j=j*x x=x-1 until (x<2) else j=x endif endp factorial(5)
Contents of j [1,] 120
Group: | Flow Control |
See also: | endo until while |