Evaluates a test expression, and if it is not nil, evaluates other expressions; repeats this process until the test expression evaluates to nil
Supported Platforms: Windows and Mac OS
(while testexpr [expr ...])
Type: Integer, Real, String, List, Symbol, File, ads_name, T, or nil
The expression containing the test condition.
Type: Integer, Real, String, List, Symbol, File, ads_name, T, or nil
One or more expressions to be evaluated until testexpr is nil.
Type: Integer, Real, String, List, Symbol, File, ads_name, T, or nil
The most recent value of the last expr.
The while function continues until testexpr is nil.
The following code calls user function some-func ten times, with test set to 1 through 10. It then returns 11, which is the value of the last expression evaluated:
(setq test 1) (while (<= test 10) (some-func test) (setq test (1+ test)) )