While
- 構文
 - (while testexpr [expr...])
 
  
- 機能
 - テスト式を評価して nil でなければ、他の式を評価する。テスト式の評価が nil になるまでこの処理を繰り返す。 while 関数は、testexpr が nil になるまで継続する。
 
- 引数
 - 
- testexpr : テスト条件を含んだ式。
 - expr : testexpr が nil になるまで評価される 1 つまたは複数の式。
 
 
- 戻り値
 - 最後の expr の最新の値。
 
- サンプル
 - 次のコードは、test に 1 から 10 を設定して、ユーザ定義関数 some-func を 10 回呼び出し、評価された最後の式の値 11 を返す。
 
(setq test 1) (while (<= test 10) (some-func test) (setq test (1+ test)) )
- 次のコードは、線分コマンドを実行後にユーザ入力が終わるまで入力待ちを繰り返す。
 
(command "_line") (while (eq 1 (getvar "CMDACTIVE")) (command pause) ) (princ "\nline 終了")