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) <xplore commands> 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



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