🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.pl1
Article #22

Re: SYSIN trouble with Iron Spring compiler for Linux

#22
From: Peter Flass
Date: Sat, 24 Oct 2026 02:55
72 lines
4029 bytes
On 10/23/26 18:18, David Meyer wrote:
> I am a PL/I newbie trying to set up the Iron Spring compiler on my Linux
> (Devuan Excalibur 6) box.
> 
> I think I have followed all the installation steps, and can use SA_make
> to compile a "Hello, World!" program that runs as expected.
> 
> However, while slightly more complex programs that read input from SYSIN
> (see example below) appear to compile normally, the program behaves
> unexpectedly when run:
> 
> 1. The initial prompt message ('input data:') is not displayed. In its
>     place is just the cursor at the beginning of new line.
> 
> 2. All input appears to be ignored unless each input line has at least
>     one space character immediately preceeding the carriage return at the
>     end of the line.
> 
> 3. After all data has been entered as in 2., the 'input data:' prompt is
>     displayed below the echoed input data and one line above
>     'answer:'. (After displaying 'answer:', the result is printed as
>     expected.)
> 
> (The program runs and reads SYSIN data as expected ('input data:'
> displayed first, input lines don't require space before carriage return)
> on OpenVMS with the Kednos compiler.)
> 
> Any clues what my problem is?
> 
> ====================
> 
> /*	CA001 - Code Abbey Problem #1 - Sum "A+B"
>   * 	2026/10/16 David Meyer <papa@sdf.org> +JMJ
>   *
>   * 	Language: PL/I (ANSI X3.74 1981)
>   * 	Compiler: Kednos PL/I V3.8 for OpenVMS VAX
>   * 	System:   VAX 7000/640 "Rosencrantz"
>   */
> 
> CA001: PROCEDURE OPTIONS (MAIN);
> 
> DECLARE (a, b) FIXED BINARY;
> 
> PUT LIST ('input data:');
> PUT SKIP;
> GET LIST (a, b);
> PUT LIST ('answer:');
> PUT SKIP;
> PUT LIST (a + b);
>   
> END;
> 
> ====================
> 

The answer is ... it's complicated.
1. Iron Spring I/O is buffered by default, so normally your output, 
including the prompt, will not appear until a buffer is filled or the 
file is closed. I have borrowed from other compilers to get around this.
If you code "  dcl sysprint env(interactive);" it will turn off 
buffering to get your prompt to appear immediately.
2. Using "GET LIST" the program is going to keep reading characters from 
the input until the fields have been filled, so you have to terminate 
the second number with a space or comma to indicate that it;s done.
for example typing 1 2, 1,2, of 1,2B (B=space). A record boundary 
(carriage return) is ignored and the program is still looking for input 
[Most control characters are ignored. I'm not sure why I don't recognize 
^D as EOF, I'll put that on the list (bug 677)]
3. By default PUT LIST will put the output in quotes.

I know you're starting with a simple example, but there are better ways 
to do PL/I interactive I/O.
Technical Details
Message-ID: <11bh6n6$2c79m$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <87h5ibuc9x.fsf@localhost>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: Peter Flass <Peter@Iron-Spring.com>
Newsgroups: comp.lang.pl1
Subject: Re: SYSIN trouble with Iron Spring compiler for Linux
Date: Fri, 23 Oct 2026 19:55:32 -0700
Organization: A noiseless patient Spider
Lines: 72
Message-ID: <11bh6n6$2c79m$1@dont-email.me>
References: <87h5ibuc9x.fsf@localhost>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 24 Oct 2026 02:55:35 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="2497846"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/6oHVnEr1dUkZnrkMqyi1o"; posting-host="936558cdf0b1fdb704d6b91c7221c27b"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:/Bjuqjc4yi8n3SJmtpUVZaoaTBM= sha256:ABlmD3CB/4nHF4FMQNRriq4eciHNSZ4Xd+f5nNVZ8y8=
	sha1:GFl9QH6q1ONbVoqV/sNKad3gXqs= sha256:HfNh0awPN2mD5PMiKD3SDRM9oyeTeb4DJ3A4q+wEUcc=
Content-Language: en-US
In-Reply-To: <87h5ibuc9x.fsf@localhost>