GLINE

Get a line of input

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
xcall GLINE([length, ]buffer[, prompt])

Arguments

length

(optional) The variable that will be loaded with the length of the input line. (n)

buffer

The variable that will be loaded with the input line stored left‑justified over blanks. If the buffer area is too short, only the leftmost portion of the input line is stored; the remainder is discarded. (a)

prompt

(optional) The message displayed as a prompt for input. (a)

Discussion

The GLINE subroutine gets a line of input from the terminal device. It performs a READS statement and is included to provide source‑code compatibility with obsolete Synergy DBL products on PDP‑11 systems.

The length argument contains the same value that %RDLEN returns when a READS statement is used.

Note

If the prompt argument is specified, you must also specify the length argument.

On OpenVMS, the GLINE subroutine uses the OpenVMS LIB$GET_INPUT routine to get an input line from the device assigned to the logical name SYS$INPUT.

Examples

.define TTCHN           ,1
record
    msg                 ,a50
    lng                 ,d2
     alng                ,a2 @lng

proc
    open(TTCHN, o, "tt:")
    writes(TTCHN, "Tracing input until *end*")
    while (msg .ne. "*end*") do
      begin
        xcall gline(lng, msg)
        writes(TTCHN, "lng = " + alng + ", Msg: "+ msg)
      end
    stop
end