コンパイラ ディレクティブ

コンパイラ ディレクティブは Curl® コンパイラの動作を変更します。 たとえば、ディレクティブを使用して特定の種類のエラーを有効または無効にしたり、 コード パフォーマンスの基準を示すことができます。 この章ではコンパイラ ディレクティブについて説明します。
ディレクティブを指定するには 2 通りの方法があります。

アプレット、パッケージまたはスクリプト全体のディレクティブの指定

アプレット、パッケージまたはスクリプトの宣言に compiler-directives 式を含めます。 compiler-directives 式の構文を次に示します。
構文:{compiler-directives
    list-of-compiler-directives
}
説明:
たとえば、次のパッケージ宣言にはコンパイラ ディレクティブが含まれています。
{package MY-PACKAGE,
    {compiler-directives
        careful? = true
    }
}

コード ブロックのディレクティブの指定

ソース コードを with-compiler-directives 式で囲みます。 with-compiler-directives 式の構文を次に示します。
構文:{with-compiler-directives
    list-of-compiler-directives
 do
    code-block
}
value 式と同様に、with-compiler-directives 式は 最後に実行された式の値を返します。たとえば、次の式では any データ型のオブジェクトに対してメソッドを呼び出します。
{with-compiler-directives
    allow-any-calls? = true
 do
    let some-object:any = {some-function}
    {some-object.foo}
}

ディレクティブのリスト

現在サポートされているコンパイラ ディレクティブは次のとおりです。