Libraries
Stdio Source Code
 previous   up   next 

Variable Summary
external_file
STD_IN
Standard input file of the operating system.
external_file
STD_OUT
Standard output file of the operating system.
external_file
STD_ERR
Standard error file of the operating system.
file
IN
Standard input file used by read and readln.
file
OUT
Standard output file used by write and writeln.

Function Summary
void
write (in string: stri)
Write a string to the standard output file (OUT).
void
writeln
Write end-of-line to the standard output file.
void
writeln (in string: stri)
Write a string followed by end-of-line to the standard output.
void
read (inout string: aVar)
Read a word from the standard input file (IN).
void
read (inout string: aVar, in string: defaultValue)
Read a word from the standard input file (IN) or use defaultValue.
void
readln (inout string: aVar)
Read a line from the standard input file (IN).
void
readln (inout string: aVar, in string: defaultValue)
Read a line from the standard input file (IN) or use defaultValue.
void
readln
Discard a line from the standard input file (IN).

Variable Detail

STD_IN

var external_file: STD_IN

Standard input file of the operating system. The file IN is initialized with STD_IN.


STD_OUT

var external_file: STD_OUT

Standard output file of the operating system. The file STD_OUT only supports characters <= '\255;'. The file OUT is initialized with STD_OUT.


STD_ERR

var external_file: STD_ERR

Standard error file of the operating system. The file STD_ERR only supports characters <= '\255;'.


IN

var file: IN

Standard input file used by read and readln. Assigning a file to IN changes the source of the functions read and readln.


OUT

var file: OUT

Standard output file used by write and writeln. Assigning a file to OUT changes the destination fo the functions write and writeln. STD_OUT only supports characters <= '\255;'. To allow Unicode characters assign STD_CONSOLE to OUT at the beginning of main.


Function Detail

write

const proc: write (in string: stri)

Write a string to the standard output file (OUT).


writeln

const proc: writeln

Write end-of-line to the standard output file. The file type of OUT decides how writing end-of-line is done. It can be done by writing '\n', but other solutions are also possible.


writeln

const proc: writeln (in string: stri)

Write a string followed by end-of-line to the standard output. The file type of OUT decides how writing end-of-line is done. It can be done by writing '\n', but other solutions are also possible.


read

const proc: read (inout string: aVar)

Read a word 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 word ending characters are not copied into the string. When the function is left IN.bufferChar contains the word ending character (' ', '\t', '\n' or EOF).


read

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

Read a word from the standard input file (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. If the word is empty defaultValue is assigned to aVar. The word ending characters are not copied into the string. When the function is left IN.bufferChar contains the word ending character (' ', '\t', '\n' or EOF).


readln

const proc: readln (inout string: aVar)

Read a line from the standard input file (IN). The function reads a string up to end-of-line or EOF. The line ending characters are not copied into the string. When the function is left IN.bufferChar contains the line ending character ('\n' or EOF).


readln

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

Read a line from the standard input file (IN) or use defaultValue. The function reads a string up to end-of-line or EOF. If the line is empty defaultValue is assigned to aVar. The line ending characters are not copied into the string. When the function is left IN.bufferChar contains the line ending character ('\n' or EOF).


readln

const proc: readln

Discard a line from the standard input file (IN). The function discards characters up to end-of-line or EOF. When the function is left IN.bufferChar contains the line ending character ('\n' or EOF).



 previous   up   next