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 6-1:<br />

Predeclared Procedures<br />

Procedure<br />

Parameter Type<br />

Action<br />

CLOSE (f)<br />

f = file variabJe<br />

Closes file f.<br />

DATE(string)<br />

string = variable of<br />

type PACKED ARRAY<br />

r 1 •• 1 1 1 0 F C HA R 1<br />

Assigns current date<br />

to string.<br />

DISPOSE (p)<br />

p = pointer variable<br />

Dea.lJocates<br />

for p ..... The<br />

variable p<br />

undefined.<br />

storage<br />

po in ter<br />

becomes<br />

DISPOSE(p,<br />

tl, ... ,tn)<br />

FIND (f ,n)<br />

p = pointer variable<br />

tl, ... ,tn tag<br />

field constants<br />

f = file variable n<br />

positive integer<br />

expression<br />

Releases storage<br />

occupied by p .... ; used<br />

when p .... is a record<br />

with variants. Tag<br />

field values are<br />

optional; if<br />

specified, they must<br />

be identical to<br />

those specified when<br />

storage<br />

was<br />

allocated by NEW.<br />

Moves the current<br />

file position to<br />

component n of file<br />

f •<br />

GET (f)<br />

f<br />

file variable<br />

Moves the current<br />

file position to the<br />

next component of f.<br />

Then GET (f) assigns<br />

the value of that<br />

component to f .... , the<br />

file buffer<br />

variable.<br />

HALT<br />

None<br />

Terminates execution<br />

of the program.<br />

LINELIMIT(f,n)<br />

f text<br />

variable n<br />

expression<br />

file<br />

integer<br />

Terminates execution<br />

of the program when<br />

output to file f<br />

exceeds n lines. The<br />

value for n is reset<br />

to its default after<br />

each call to REWRITE<br />

for file f.<br />

MARK (a)<br />

a a variable of<br />

type .... INTEGER<br />

Places a marker for<br />

use when allocating<br />

memory for dynamic<br />

variables.<br />

NEW (p)<br />

p<br />

pointer variable<br />

Allocates storage<br />

for p.... and assigns<br />

its address to p.<br />

~-2

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

Saved successfully!

Ooh no, something went wrong!