Previous Topic: %FunctionReturnNext Topic: %Include


%If()

Provides for the execution of conditional macro code based on a value of TRUE for the expression.

Syntax

%If (<predicate>) {<macro code>}

Syntax Example

%ForEachAttribute() {

%If(%AttIsPK) {

%AttName -> PK}

}

Expansion

master-number -> PK

movie-copy-number -> PK

Full Syntax

%If (<predicate>) {<macro code>} %Else {<macro code>}

Full Syntax Example

%ForEachAttribute() {

%If(%AttIsPK) {

%AttName -> PK}

%Else {

%AttName -> Not a PK}

}

Expansion

master-number -> PK

movie-copy-number -> PK

employee-store -> Not a PK

Usage

Classified as a Miscellaneous macro.