Index of /dee/software/ST/lib
Name Last modified Size Description
Parent Directory -
MOD/ 2022-09-25 16:00 -
README.html 2022-09-25 16:00 2.5K
ST.DEF.txt 2022-09-25 16:00 783
STchars.DEF.txt 2022-09-25 16:00 1.6K
STstrings.DEF.txt 2022-09-25 16:00 734
STutility.DEF.txt 2022-09-25 16:00 473
PRIMITIVE
getc: get a character from standard input
USAGE
PROCEDURE getc (VAR c: character): character;
FUNCTION
getc reads at most one character from the standard input STDIN. If there are
no more characters available, getc returns ENDFILE; if the input is at
end-of-line, it returns NEWLINE and advances to the beginning of the next
line; otherwise it returns the next input character.
RETURNS
getc returns the value of type character corresponding to the character read
from the standard input, or one of the special values NEWLINE or ENDFILE as
specified above. The return value is also written in the argument c.
PRIMITIVE
putc: put a character on standard output
USAGE
PROCEDURE putc (c: character);
FUNCTION
putc writes the character c to the standard output STDOUT; if the value of
the argument c is NEWLINE, an appropriate end-of-line condition is generated.
RETURNS
Nothing.
PRIMITIVE
getarg: get a command line argument
USAGE
PROCEDURE getarg (n: INTEGER; VAR str: string; maxsize: INTEGER): BOOLEAN;
FUNCTION
getarg writes up to maxsize characters (including an ENDSTR) of the 'n'th
command line argument into the string str. The first argument on the command
line is argument number one. No error is reported if the argument string is truncated.
RETURNS
getarg returns true if the argument is present, otherwise false.
PRIMITIVE
nargs: get number of command line arguments
USAGE
PROCEDURE nargs: INTEGER;
FUNCTION
nargs determines the number of arguments used on the command line that invoked
the program, suitable for copying by getarg.
RETURNS
nargs returns the number of arguments found on the command line, i.e., a
number greater than or equal to zero.
PRIMITIVE
message: print a message and continue
USAGE
PROCEDURE message('your message here');
FUNCTION
message writes the literal string specified to a highly visible place, such as
the user's terminal, then continues execution.
RETURNS
Nothing.
PRIMITIVE
error: print a message and exit
USAGE
PROCEDURE error ('your message here');
FUNCTION
error writes the literal string specified to a highly visible place, such as
the user's terminal, then performs an abnormal exit.
RETURNS
Nothing. Moreover, error never returns control to its caller.
PRIMITIVE
xor: exclusive-or of a and b
USAGE
PROCEDURE xor(a, b: character): character;
FUNCTION
Bitwise exclusive-or of characters, also known as the symmetric sum, half
addition, or not equivalence.
RETURNS
The resulting character.