日本語は機械翻訳による参考訳です。内容に矛盾や不一致があった場合には、英語の内容が優先されます。
インデントのガイドライン
OnCommand Workflow Automation ( WFA )用の PowerShell または Perl スクリプトを作成する場合は、インデント設定のガイドラインに注意する必要があります。
| ガイドライン | 例 |
|---|---|
タブは、 4 つの空白スペースに等しい。 |
|
ブロックの先頭と末尾を表示するには、タブと波かっこを使用します。 |
PowerShell スクリプト if
($pair.length-ne 2)
{
throw "Got wrong input data"
}
Perl スクリプト if
(defined $MaxDirectorySize)
{
# convert from MBytes to Bytes
my $MaxDirectorySizeBytes = $MaxDirectorySize *
1024 * 1024;
}
|
オペレーションのセットまたはコードのチャンク間に空白行を追加します。 |
$options=$option.trim();
$pair=$option.split(" ");
Get-WFAlogger -Info -messages $("split options: "+
$Pair)
|