27.03.2013 Views

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Conditional Processing<br />

DEFINE—!ENDDEFINE 455<br />

The !IF construct specifies conditions for processing. The syntax is as follows:<br />

!IF (expression) !THEN statements<br />

[!ELSE statements]<br />

!IFEND<br />

• !IF, !THEN, and !IFEND are all required. !ELSE is optional.<br />

• If the result of the expression is true, the statements following !THEN are executed. If the<br />

result of the expression is false and !ELSE is specified, the statements following !ELSE are<br />

executed. Otherwise, the program continues.<br />

• Valid operators for the expressions include !EQ, !NE, !GT, !LT, !GE, !LE, !OR, !NOT, and<br />

!AND, or =, ~= (¬=), >, =,

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!