Node:get-text, Next:get-text-stat-old, Previous:mark-text-old, Up:Protocol Requests
get-text [25] (( text : Text-No; start-char : INT32; end-char : INT32 )) -> ( HOLLERITH );
Retrieve text number text
from the LysKOM database, starting at
position start-char
and ending at position end-char
. The
first character in the text is numbered 0 and the last can be retrieved
using get-text-stat
. It is also permitted to request a character
position beyond the actual end of the text, in which case as much text
as is available will be returned.
Example:
1 25 100 0 32766 =1 25HYawn^JNothing is happening 2 25 100 5 32766 =2 20HNothing is happening 3 25 100 0 3 =3 4HYawn
In the example, ^J
represents a newline.
In this example, text 100 is requested three times, first from position 0 to position 32766, then from position 5 to position 32766 and finally from position 0 to position 4. The first reply contains the entire text, the following two contain only the requested portion.
no-such-text
text
does not exits or no read permission.
This error code will also be used when attempting to fetch any text
except the motd-of-lyskom text without logging in first.
text-zero
index-out-of-range
start-char
is larger than the length of the text.