Jump/ja

From Second Life Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

The correct title of this article is jump/ja. The initial letter is shown capitalized due to technical restrictions.

jump target;

jump target;
• label target ラベルは階層ツリーでjumpを含むスコープ区間になければなりません。

@target;

• label target ジャンプのターゲットになるべきラベルは、jumpがラベルと同じスコープか、ラベルが存在するよりも内側のスコープに存在する場合のみ、ターゲットとなることが出来ます。

言い換えれば、異なる関数間、異なる(離れた)スコープ間、異なるステート間でジャンプする事は出来ません。そのようなコードを書いた場合、単純にjumpに対応するラベルが見つからないと言うコンパイルエラーを起こすでしょう。

注意点

targetは、全てのジャンプは行いません。

複数に及ぶジャンプのためには、更にtargetを使う必要があるでしょう。


技術的な限界、見落とし、バグの場合、常に無いものとして扱われます。

サンプル

integer a = 5;
jump over;
@in;
a = 6;
@over;
llOwnerSay((string)a);
if(a < 6)
    jump in;
//script will say 5 and then 6

参考情報

キーワード

•  return
•  state