ifディレクティブ
このセクションの内容:
構文
if (expr) {directives[ } else if (expr) {directives] [ } else {directives] }
ここで、exprは式です(リンカ設定ファイル内の式を参照)。
パラメータ
| 任意のILINKディレクティブ |
説明
ifディレクティブは、条件に基づいて他のディレクティブを含めるまたは除外します。これにより、同じファイルで、たとえば、バンクおよび非バンクメモリの両方でいくつかの異なるメモリ設定を行うことができます。
ifディレクティブの選択していない部分内にあるテキストは構文チェックされません。そのようなテキストでは、トークン化し、括弧はじめ({) トークンが、括弧終わり(}) トークンと一致している必要があります。
Because there are no mutable constructs in linker configuration files, context can only be added, not removed or modified. This means that if conditions are resolved when the context for them is available. For example, if(x > 5) will be resolved when x has a well-defined value, or give an error if no definition for x can be found without resolving the condition.
例
空Regionを参照してください。