Seed7 - The extensible programming language
Seed7 FAQ Manual Screenshots Examples Libraries Algorithms Download Links
Libraries AES ARC4 Array ASN.1 Bigfile Bigint Bigrat Bin32 Bin64 Bitdata Bitmapfont Bitset Bitsetof Boolean Browser Bstring Bytedata Cards Category CC config Cgi Cgi dialog Char Charsets Cipher Clib_file Color CLI Commands Complex Console Crc32 Deflate DES Dialog Dir Draw Duration Echo Editline Enable_input Enable_io Enable_output Encoding Environment External_file File File system Float Font Forloop Ftp Getf Gethttp Gethttps Graph Graph_file Gzip Hash Hashsetof Hmac Html_ent Httpserv Idxarray Image Inflate Inflate file Inifile Integer Keybd Line Listener LZW Make Math Msgdigest Null_file Osfiles Picture utility Pixmap_file Pixmapfont PKCS #1 Poll Process Progs Propertyfile Rational Reference Ref_list Scanfile Scanstri Set Shell Smtp Sockbase Socket SQL base Stdio Strifile String Stritext Subrange Tar Text Time TLS/SSL Triple DES Unicode Utf16 Utf8 Vectorfont 3D Vector Window Wrinum X.509 Xmldom Xml_ent Zip
Libraries
Enable_input Source Code
 previous   up   next 

Function Summary
void
enable_input (in type: aType)
Template function to define input functions for aType.
void
read (inout file: inFile, inout aType: aVar)
Read aVar from a word read from inFile.
void
read (inout file: inFile, inout aType: aVar, in aType: defaultValue)
Read aVar from a word read from inFile or use defaultValue.
void
readln (inout file: inFile, inout aType: aVar)
Read aVar from a line read from inFile.
void
readln (inout file: inFile, inout aType: aVar, in aType: defaultValue)
Read aVar from a line read from inFile or use defaultValue.
void
read (inout aType: aVar)
Read aVar from a word read from the standard input file IN.
void
read (inout aType: aVar, in aType: defaultValue)
Read aVar from a word read from standard input (IN) or use defaultValue.
void
readln (inout aType: aVar)
Read aVar from a line read from the standard input file IN.
void
readln (inout aType: aVar, in aType: defaultValue)
Read aVar from a line read from standard input (IN) or use defaultValue.

Function Detail

enable_input

const proc: enable_input (in type: aType)

Template function to define input functions for aType. It defines the functions read and readln. The functions read a whitespace terminated word respectively a line as string. Afterwards the parse operator is used to convert the string to an aType value. The functions read and readln are defined with file argument and without file argument. The functions without file argument use the standard input file IN.


read

const proc: read (inout file: inFile, inout aType: aVar)

Read aVar from a word read from inFile. Before reading the word it skips spaces and tabs. The function accepts words ending with " ", "\t", end-of-line or EOF. The conversion to the type aType is done with the parse operator. When the function is left inFile.bufferChar contains the word ending character (' ', '\t', '\n' or EOF).

Raises:
RANGE_ERROR - When the parse operator cannot convert the word to the type aType.

read

const proc: read (inout file: inFile, inout aType: aVar, in aType: defaultValue)

Read aVar from a word read from inFile or use defaultValue. Before reading the word it skips spaces and tabs. The function accepts words ending with " ", "\t", end-of-line or EOF. When the word is empty defaultValue is assigned to aVar. The conversion to the type aType is done with the parse operator. When the function is left inFile.bufferChar contains the word ending character (' ', '\t', '\n' or EOF).

Raises:
RANGE_ERROR - When the parse operator cannot convert the word to the type aType.

readln

const proc: readln (inout file: inFile, inout aType: aVar)

Read aVar from a line read from inFile. The function reads a string up to end-of-line or EOF. The conversion to the type aType is done with the parse operator. When the function is left inFile.bufferChar contains the line ending character ('\n' or EOF).

Raises:
RANGE_ERROR - When the parse operator cannot convert the line to the type aType.

readln

const proc: readln (inout file: inFile, inout aType: aVar, in aType: defaultValue)

Read aVar from a line read from inFile or use defaultValue. The function reads a string up to end-of-line or EOF. When the line is empty defaultValue is assigned to aVar. The conversion to the type aType is done with the parse operator. When the function is left inFile.bufferChar contains the line ending character ('\n' or EOF).

Raises:
RANGE_ERROR - When the parse operator cannot convert the line to the type aType.

read

const proc: read (inout aType: aVar)

Read aVar from a word read from the standard input file IN. Before reading the word it skips spaces and tabs. The function accepts words ending with " ", "\t", end-of-line or EOF. The conversion to the type aType is done with the parse operator. When the function is left IN.bufferChar contains the word ending character (' ', '\t', '\n' or EOF).

Raises:
RANGE_ERROR - When the parse operator cannot convert the word to the type aType.

read

const proc: read (inout aType: aVar, in aType: defaultValue)

Read aVar from a word read from standard input (IN) or use defaultValue. Before reading the word it skips spaces and tabs. The function accepts words ending with " ", "\t", end-of-line or EOF. When the word is empty defaultValue is assigned to aVar. The conversion to the type aType is done with the parse operator. When the function is left IN.bufferChar contains the word ending character (' ', '\t', '\n' or EOF).

Raises:
RANGE_ERROR - When the parse operator cannot convert the word to the type aType.

readln

const proc: readln (inout aType: aVar)

Read aVar from a line read from the standard input file IN. The function reads a string up to end-of-line or EOF. The conversion to the type aType is done with the parse operator. When the function is left IN.bufferChar contains the line ending character ('\n' or EOF).

Raises:
RANGE_ERROR - When the parse operator cannot convert the line to the type aType.

readln

const proc: readln (inout aType: aVar, in aType: defaultValue)

Read aVar from a line read from standard input (IN) or use defaultValue. The function reads a string up to end-of-line or EOF. When the line is empty defaultValue is assigned to aVar. The conversion to the type aType is done with the parse operator. When the function is left IN.bufferChar contains the line ending character ('\n' or EOF).

Raises:
RANGE_ERROR - When the parse operator cannot convert the line to the type aType.


 previous   up   next