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.

PROCEDURES AND FUNCTIONS<br />

Table ~-2:<br />

Predeclared Functions (Cont.)<br />

Category<br />

Function<br />

Parameter Result<br />

Type Type<br />

Purpose<br />

PRED(a)<br />

SUCC(a)<br />

any<br />

scalar<br />

type<br />

except<br />

a r eaJ<br />

type<br />

any<br />

scaJar<br />

type<br />

except<br />

a real<br />

type<br />

same<br />

type as<br />

parameter<br />

Returns the<br />

predecessor value<br />

in the type of a<br />

(if a predecessor<br />

exists). But it is<br />

up to you to make<br />

sure there is<br />

pred/succ. The<br />

compiJer will<br />

always return with<br />

the next ordinal<br />

value higher/lower<br />

than a. There is<br />

no<br />

bounds<br />

checking. Checking<br />

0ccurs only if the<br />

PRED(a) or SUCC(a)<br />

is in an<br />

ass ignmen t<br />

statement, for<br />

example:<br />

(*$CHE~K+*)<br />

x: =PRED (a)<br />

same Returns the<br />

type as successor value in<br />

parameter the type of a (if<br />

a successor<br />

exists) .<br />

<strong>PASCAL</strong> also provides additional arithmetic routines available with<br />

PASLIB, the <strong>PASCAL</strong> library. Use the following format to specify a<br />

routine from the Common Math Library:<br />

where:<br />

reSUl t type;}<br />

FUNCTION routine name (VAR parameter list): { FORTRAN<br />

routine name is one of the names listed in Table ~-3.<br />

parameter list are acceptable arguments for this routine. See<br />

the <strong>TOPS</strong>-IO/<strong>TOPS</strong>-<strong>20</strong> Common Math Library Reference<br />

<strong>Manual</strong>.<br />

result type<br />

is the type of the function result.<br />

Table ~-3 lists these routines and their purpose. For more<br />

information concerning these routines, refer to the <strong>TOPS</strong>-IO/<strong>TOPS</strong>-<strong>20</strong><br />

Common Math Library Reference <strong>Manual</strong>.<br />

6-16

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

Saved successfully!

Ooh no, something went wrong!