Until
例題
すべて開く すべて閉じるスコープ (2)
アプリケーション (2)
特性と関係 (3)
Until[test,body]は,事実上,Until[body;test]に等しい:
n = 1;Until[n > 3, Echo[n++]];nn = 1;Until[Echo[n++];n > 3];nUntil[test,body]は test の前に body を評価する:
Until[True, Print["body"]]While[test,body]は body の前に test を評価する:
While[False, Print["body"]]UntilとWhileは同じ動作の再現に反対のテストを必要とする:
i = 0;Until[i > 3, Print[i];i++]i = 0;While[Not[i > 3], Print[i];i++]しかし,Whileループではテストがもう一度評価される:
i = 0;Until[Print[i];i > 3, i++]i = 0;While[Print[i];Not[i > 3], i++]関連するガイド
-
▪
- ループ構文 ▪
- 手続き型プログラミング
テキスト
Wolfram Research (2022), Until, Wolfram言語関数, https://reference.wolfram.com/language/ref/Until.html.
CMS
Wolfram Language. 2022. "Until." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Until.html.
APA
Wolfram Language. (2022). Until. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Until.html
BibTeX
@misc{reference.wolfram_2026_until, author="Wolfram Research", title="{Until}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/Until.html}", note=[Accessed: 02-November-2026]}
BibLaTeX
@online{reference.wolfram_2026_until, organization={Wolfram Research}, title={Until}, year={2022}, url={https://reference.wolfram.com/language/ref/Until.html}, note=[Accessed: 02-November-2026]}