Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Group: Flow Control
See also: do until while

Function: endo
Description: endo end a while loop. while has to be followed by an endo.

Usage: while (cond) endo

Example:



proc(j)=factorial(x)

  if (x>1)

    j=1

    while (x>=2)

      j=j*x

      x=x-1

    endo

  else 

    j=x

  endif

endp



factorial(5)

Result:



Contents of j

[1,]      120 

Group: Flow Control
See also: do until while

Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

(C) MD*TECH Method and Data Technologies, 21.9.2000