Category: Statement

Syntax: if <condition> <statement1> else <statement2> end

Description

Use if to implement a conditional statement. The condition expression must be bool type. Otherwise, the condition is ill-formed.

When <condition> evaluates to true, <statement1> executes. If <condition> is false, <statement2> executes.

Example:

if tau>45ns mwpulse t180 else wait t180 end

Legend: PPL keywords; PPL pulse commands; comments.

Note that else keyword is necessary even if there is no <statement2>.

Example:

if use_pulse mwpulse 200ns else end

Legend: PPL keywords; PPL pulse commands; comments.