02.05.2013 Views

Description - Mks.com

Description - Mks.com

Description - Mks.com

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.

evaluation of expressions.<br />

indexable_object[expression]<br />

obtains the value of a specific indexable element. Indexable objects (vectors and strings) are<br />

indexed with 0-origin. If a vector subscript is out of range, an error message is displayed, and the<br />

null string is returned. As a special case, the 0-th element of a 0-length vector does not cause an<br />

error; instead, its value is the null string.<br />

Arithmetic Operators<br />

The standard multiplication operators are:<br />

expression1 * expression2<br />

expression1 / expression2<br />

expression1 % expression2<br />

representing integer multiplication, division, and the modulus. Non-integer operands are converted<br />

to integers in the usual way.<br />

The standard addition operators are:<br />

expression1 + expression2<br />

expression1 - expression2<br />

representing addition and subtraction. Non-integer operands are converted to integers in the usual<br />

way.<br />

Equality Operators<br />

The result of:<br />

expression1 == expression2<br />

is true if the two expressions have equal values.<br />

expression1 != expression2<br />

is true if the two expressions are not equal.<br />

In both cases, if either operand is an integer, the other is converted into an integer for the purposes<br />

of <strong>com</strong>parison; otherwise, both expressions are converted into strings, and then <strong>com</strong>pared.<br />

316 of 457

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

Saved successfully!

Ooh no, something went wrong!