ジャンプ先: 概要. 戻り値. キーワード. 関連. フラグ. MEL 例.
warning [-showLineNumber boolean]
warning は、取り消し不可能、照会不可能、および 編集不可能 です。
ユーザ独自のスクリプトから警告するメッセージを出せるように、警告コマンドが提供されます。文字列引数は、言語に適切なセパレータ(Python の場合は #、Mel の場合は //)で囲まれたエラー メッセージを前につけた後、コマンド ウィンドウに表示されます(またはバッチ モードで実行した場合、stdout)。なし
| ロング ネーム(ショート ネーム) | 引数タイプ | プロパティ | ||
|---|---|---|---|---|
-showLineNumber(-sl)
|
boolean
|
|
||
|
||||
proc lightWarning()
{
$l = `ls -lights`;
if (size($l) == 0) {
warning "No Lights";
}
}
lightWarning()
//
// The above will produce the following output:
//
// // Warning: No Lights //
//
// When the option to show line numbers in errors is enabled the output will
// be the following:
//
// // Warning: line 5: No Lights //
//