While/ja: Difference between revisions
< While
cats |
Naoya Bellic (talk | contribs) LSOの場合について追加 |
||
| Line 36: | Line 36: | ||
|also_articles | |also_articles | ||
|also_footer | |also_footer | ||
|notes={{LSLG|do-while}} のループは while ループや {{LSLG|for/ja|for}} | |notes={{LSLG|do-while/ja|do-while}} のループは while ループや {{LSLG|for/ja|for}} ループより LSO においては速いです。 | ||
|mode | |mode | ||
|deprecated | |deprecated | ||
Revision as of 01:36, 21 February 2013
| LSL ポータル | 関数 | イベント | 型 | 演算子 | 定数 | 実行制御 | スクリプトライブラリ | カテゴリ別スクリプトライブラリ | チュートリアル |
while( condition ) loop
| • | condition | – | これが実行されてtrueであれば loop が実行されます。 | |
| • | loop | – | シングルステートメントでもブロックステートメントでも空のステートメントのいずれも可能です。 |
いずれのステートメントが空でも可能です。
詳細
例
//シングルステートメント
integer a = 0;
integer b = 10;
while(a < b)
llOwnerSay((string)(a++));
//ブロックステートメント
integer a = 0;
integer b = 10;
while(a < b)
{
llOwnerSay((string)a);
++a;
}
//空のステートメント integer a = 0; integer b = 10; while(a++ < b);