16.12.2012 Views

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ld<br />

Localization<br />

Exit values<br />

Related information<br />

c89<br />

ld uses the following localization environment variables:<br />

v LANG<br />

v LC_ALL<br />

v LC_CTYPE<br />

v LC_MESSAGES<br />

0 Successful completion.<br />

>0 An error occurred during processing.<br />

let — Evaluate an arithmetic expression<br />

Format<br />

Description<br />

Examples<br />

let expression ...<br />

((expression))<br />

let evaluates each arithmetic expression from left to right, with normal algebraic<br />

precedence (multiplication before addition, for example). let uses long integer<br />

arithmetic with no checks for overflow. No output is generated; the exit status is 0 if<br />

the last expression argument has a nonzero value, and 1 otherwise.<br />

The following two lines are equivalent: the second form avoids quoting and<br />

enhances readability. These two forms are extensions to the P<strong>OS</strong>IX standard.<br />

let "expression"<br />

((expression))<br />

The P<strong>OS</strong>IX version of this command is as follows:<br />

$((expression))<br />

Expressions consist of named variables, numeric constants, and operators.<br />

Characters in the names of named variables must come from the P<strong>OS</strong>IX portable<br />

character set.<br />

See “Arithmetic Substitution” on page 562<br />

Examples of the three forms of the let command are as follows:<br />

1. The example<br />

let a=7<br />

echo $a<br />

produces:<br />

7<br />

2. The example<br />

echo $((a=7*9))<br />

342 z/<strong>OS</strong> <strong>V1R9.0</strong> <strong>UNIX</strong> <strong>System</strong> <strong>Services</strong> <strong>Command</strong> Reference

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

Saved successfully!

Ooh no, something went wrong!