14.03.2014 Views

Scripting Guide - SAS

Scripting Guide - SAS

Scripting Guide - SAS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

586 JSL Syntax Reference Appendix A<br />

Conditional and Logical Functions<br />

0 (false) otherwise.<br />

Arguments<br />

a, b, c variables, references, matrices, or numbers.<br />

Notes<br />

If more than two arguments are specified, a 1 is returned only if each argument is less than the one that<br />

follows it. This is typically used in conditional statements and to control loops.<br />

See Also<br />

The Conditional Expressions and Loops section of the <strong>Scripting</strong> <strong>Guide</strong>.<br />

Not Equal(a, b)<br />

a!=b<br />

Description<br />

Compares a and b and tests if they are equal.<br />

Returns<br />

0 (false) if a and b evaluate to the same value.<br />

1 (true) otherwise.<br />

Argument<br />

a, b Any variable or number.<br />

Notes<br />

Mostly used for conditional statements and loop control.<br />

See Also<br />

The Conditional Expressions and Loops section of the <strong>Scripting</strong> <strong>Guide</strong>.<br />

Conditional and Logical Functions<br />

And(a, b)<br />

a&b<br />

Description<br />

Logical And.<br />

Returns<br />

1 (true) if both a and b are true.<br />

0 (false) if either a or b is false or if both a and b are false.<br />

Missing if either a or b is a missing value or if both a and b are missing values.<br />

Arguments<br />

Two or more variables or expressions.<br />

Notes<br />

More than two arguments can be strung together. a&b returns 1 (true) only if all arguments evaluate to<br />

true.

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

Saved successfully!

Ooh no, something went wrong!