T_GETLIN
Get lines of text from a text window
WTSupported in traditional Synergy on Windows
|
WNSupported in Synergy .NET on Windows
|
USupported on UNIX
|
VSupported on OpenVMS
|
xcall T_GETLIN(window_id, obtained_lines, array_size, first_line, num_obtained)
Arguments
window_id
The ID of the text window to access. (n)
obtained_lines
Returned with the line(s) obtained. (a)
array_size
The number of lines to get, or the size of the array. (n)
first_line
The text line at which to start retrieval. Pass 1 for the first line, 2 for the second line, etc. (n)
num_obtained
Returned with the number of lines that were obtained. (n)
Discussion
T_GETLIN retrieves one or more lines of loaded text from a text window. If the desired text is divided into 40 lines in the text window, T_GETLIN will retrieve up to 40 lines of text.
This subroutine assumes that the length of obtained_lines is large enough to hold the returned lines. Obtained_lines is either an alpha field or the first element of an alpha array.
If array_size is greater than 1, obtained_lines is considered to be the first element of an array that has at least as many elements as array_size. (If array_size is 1, the array is a single alpha field.)
First_line is the number of the text line within the window at which to start retrieval. It depends on the margins whether the number of this line corresponds with the row number. If first_line specifies a starting line that is less than one or greater than the number of text lines in the window, num_obtained will be returned as zero. A value of zero can also indicate that there are no more lines of text or that the first line is invalid. However, if the window is entirely empty and first_line is 1, num_obtained is returned as 1, and the first element of obtained_lines is returned blank.
Examples
This example starts at line one and tries to get 10 lines. It puts the lines in newtext and the actual number of lines in numlines.
xcall t_getlin(wndid, newtext, 10, 1, numlines)