LlAbs/ja: Difference between revisions
< LlAbs
Asuka Neely (talk | contribs) mNo edit summary |
Asuka Neely (talk | contribs) mNo edit summary |
||
| Line 60: | Line 60: | ||
|also_articles={{LSL DefineRow||{{Wikipedia|Absolute_value}}|}} | |also_articles={{LSL DefineRow||{{Wikipedia|Absolute_value}}|}} | ||
|notes | |notes | ||
|cat1=Math | |cat1=Math | ||
|cat2 | |cat2 | ||
|cat3 | |cat3 | ||
|cat4 | |cat4 | ||
}} | }} | ||
Revision as of 04:48, 22 September 2008
| LSL ポータル | 関数 | イベント | 型 | 演算子 | 定数 | 実行制御 | スクリプトライブラリ | カテゴリ別スクリプトライブラリ | チュートリアル |
警告
- -2147483648のllAbsは-2147483648で、これはなぜなら2147483648は有効なinteger値ではないからです。
サンプル
<lsl> // Here is a simple example. default {
state_entry()
{
llSay(0,"The absolute value of -4 is: "+(string)llAbs(-4) );
}
} </lsl>
<lsl> // Here's a more elaborate example. ShowAbsolute(integer X) {
string Message = "llAbs("
+ (string)X
+ ") --> "
+ (string)llAbs(X);
llSay(PUBLIC_CHANNEL, Message);
} default {
state_entry()
{
ShowAbsolute(-3);
ShowAbsolute(5);
ShowAbsolute(-20);
ShowAbsolute(0);
}
} </lsl>
<lsl> // Here's the output produced by the more elaborate example: Test Object: llAbs(-3) --> 3 Test Object: llAbs(5) --> 5 Test Object: llAbs(-20) --> 20 Test Object: llAbs(0) --> 0
</lsl>関連項目
特記事項
この項目はあなたにとって参考にならない項目ですか?もしかしたらLSL Wikiの関連した項目が参考になるかもしれません。