Copyright (1999-2008) EDMGROUP Pty Ltd - EZY Prolog Reference

List of predicates for group Read/Write

[This is preliminary specification and subject to change.]

List of all groups


Type

Predicate

Parameters

Flow pattern

Description

determ

closefile

FILE SymbolicName

(i)

Close a file Remarks The closefile closes the file opened with the name SymbolicFileName. The closefile succeeds even if the named file has not been opened.

determ

eof

FILE SymbolicName

(i)

Check for end-of-file Remarks The eof checks whether the current file position (see filepos) is at the end of the file. If so, eof succeeds; otherwise, it fails.

determ

nl

STRING NewLineSymbol

(o)

nl/0 causes a carriage-return/line-feed sequence to be sent to the current write device. If the newline is to be produced in connection with other output, the character '\
'--as a single character or as part of a string--does the same.

determ

nl

nl/0 causes a carriage-return/line-feed sequence to be sent to the current write device. If the newline is to be produced in connection with other output, the character '\
'--as a single character or as part of a string--does the same.

determ

openappend

FILE SymbolicName,
STRING OSFileName

(i,i)

Open a file for appending Remarks The openappend opens the disk file OSFileName for appending. It also attaches SymbolicName to the opened file for future reference within the program that contains the call to openappend.

determ

openread

FILE SymbolicName,
STRING OSFileName

(i,i)

Open a file for reading Remarks The openread opens the disk file OSFileName for reading. It also attaches SymbolicName to the opened file for future reference within the program that contains the call to openread.

determ

openwrite

FILE SymbolicName,
STRING OSFileName

(i,i)

Remarks The openwrite opens the disk file OSFileName for writing. It also attaches the SymbolicName to the opened file for future reference within the program that contains the call to openwrite. If a file called OSFileName already exists on the disk, openwrite will erase its contents.

determ

readchar

CHAR CH

(o)

Read char from file File should be opened by "see"/"openread" call

determ

readdevice

FILE SymbolicName

(i),(o)

Set or get the current read device Remarks (i) - Reassigns the current read device to the file opened with the given SymbolicName. The opened file can be one of the predefined files or any user-defined symbolic filename for a file opened for reading or modifying. (o) - Binds SymbolicName to the name of the current read device.

determ

readint

INTEGER INT

(o)

The readint predicate reads an integer from the current read device, which is the keyboard, unless the default is changed via readdevice. No conversion of the characters read takes place until readint encounters a carriage return (ASCII 13). The readint fails if the characters do not compose a valid integer, or if they specify an oversize integer

determ

readln

STRING STR

(o)

Read string from file or keyboard File should be opened by "see"/"openread" call

determ

readterm

ANY_DOMAIN DOM,
TERM OUT

(i,o)

Read term from file File should be opened by "see"/"openread" call

determ

write

TERML

(i)

Ouput to file or window File should be opened by "tell"/"openwrite" call

determ

writedevice

FILE SymbolicName

(i),(o)

Set or get the current write device Remarks (i) - Reassigns the current write device to the file opened with the given SymbolicName. The opened file can be one of the predefined symbolic files or any user-defined file opened for writing, appending, or modifying. (o) - Binds SymbolicName to the name of the current write device. The predefined symbolic filenames that can be used for output are: screen - writing to the messages window stderr - writing to trace window


Copyright 1997-2013 EDMGROUP (Australia)