BeSly Software Solutions About yab About us Admin




Name:

until -- end a repeat-loop

Synopsis:
 
repeat 
  ... 
until (...) 

Description:
The until-keyword ends a loop, which has been introduced by the repeat-keyword. until requires a condition in braces (or an expression, see here for details) as an argument; the loop will continue until this condition evaluates to true.

Example:
 
c=1 
s=1 
repeat 
	l=c 
	s=-(s+sig(s)) 
	c=c+1/s 
	print c 
until(abs(l-c)<0.000001) 
Explanation:

This program calculates the sequence 1/1-1/2+1/3-1/4+1/5-1/6+1/7-1/8+ ... ; please let me know, if you know against which value this converges.



Related: repeat