Arithmetic expressions

The types of numerical expression possible include the following. Similar forms are possible for the other expression classes. In each case an example is given for an expression used as a parameter to a function and as a right side value in a simple assignment.
simple constant
as in

simple variable
as in
constant expression
as in

expression containing variables
as in

value returned when a function is called
as in

Expressions containing only a single constant or only a number of constants and appropriate operators (cases one and three above) represent a value which is always fixed.

Those containing one or more variables will have their value determined by the values currently stored in these variables whenever that statement is executed.


Exercises on this section.


Next.

Back to Contents page.