31.12.2013 Views

TOPS-20 PASCAL Language Manual - Bitsavers

TOPS-20 PASCAL Language Manual - Bitsavers

TOPS-20 PASCAL Language Manual - Bitsavers

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

CHAPTER 3<br />

EXPRESSIONS<br />

An expression is a symbol or group of symbols that <strong>PASCAL</strong> can<br />

evaluate. These symbols can be constants, variables, or functions, or<br />

any combination of constants, variables, and functions, combined with<br />

operators. The simplest expression is a single variable or constant.<br />

This chapter lists the various operators that <strong>PASCAL</strong> provides along<br />

with the rules for forming arithmetic, relational, logical, and set<br />

expressions.<br />

3.1 OPERATORS<br />

<strong>PASCAL</strong> provides the following types of operators:<br />

• Arithmetic operators (such as +, - /)<br />

• Relational operators (such as , =)<br />

• Logical operators (such as AND, OR, NOT)<br />

• Set operators (such as IN)<br />

3.1.1 ArithmetIc Expressions<br />

An arithmetic expression usually provides a formula for calculating a<br />

value. To construct an arithmetic expression, you combine numeric<br />

constants, variables, and function identifiers with one or more of the<br />

operators from Table 3-1.<br />

3-1

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

Saved successfully!

Ooh no, something went wrong!