🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

3 total messages Started by David Meyer Sat, 24 Oct 2026 14:28
Read entire line from SYSIN
#26
Author: David Meyer
Date: Sat, 24 Oct 2026 14:28
11 lines
1435 bytes
Is there a way to read an entire line from SYSIN into a character string
variable without breaking the string into fields on space/tab/comma?

Alternatively, is there a way find if the last-parsed input field ended
with a carriage return, and therefore was the last field on the current
input stream line?

-- 
David Meyer
Takarazuka, Japan
papa@sdf.org
Re: Read entire line from SYSIN
#29
Author: Peter Flass
Date: Sat, 24 Oct 2026 14:41
18 lines
1795 bytes
On 10/24/26 07:28, David Meyer wrote:
> Is there a way to read an entire line from SYSIN into a character string
> variable without breaking the string into fields on space/tab/comma?
> 
> Alternatively, is there a way find if the last-parsed input field ended
> with a carriage return, and therefore was the last field on the current
> input stream line?
> 

 From somewhere I got the L format item, which will read the complete 
rest of an input line.

get:proc options(main);
   dcl s char(80) varying;
   get edit(s)(L);
   put skip list(s);
   end get;
Re: Read entire line from SYSIN
#28
Author: David Meyer
Date: Sun, 25 Oct 2026 01:00
31 lines
1756 bytes
Peter Flass <Peter@Iron-Spring.com> writes:

> From somewhere I got the L format item, which will read the complete rest of an
> input line.
>
> get:proc options(main);
>   dcl s char(80) varying;
>   get edit(s)(L);
>   put skip list(s);
>   end get;
>

Thank you.

I note that you can achieve the same thing with an A format item:

  ...
  get edit(s)(A);
  ...

The Kednos VMS compiler doesn't support the L format, but the A format
works as long as you specify the input field maximum width:

  ...
  get edit(s)(A(80));
  ...

-- 
David Meyer
Takarazuka, Japan
papa@sdf.org
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads