A Text8.T
is a text containing only 8-bit or CHAR
characters.
INTERFACEText8 ; TYPE T <: Public; Public = TEXT OBJECT contents: REF ARRAY OF CHAR; END; (* The array contains the characters of the text followed by a '\000'. *) PROCEDURE New (READONLY a: ARRAY OF CHAR): TEXT;
Return a new text containing the characters of a
.
PROCEDURE Create (n: CARDINAL): T;
Create a new text capable of holdingn
characters. Note that the length of thecontents
array isn+1
because of the null termination. The characters at positions[0..n-1]
are left undefined. The character at positionn
is '\000'
END Text8.