Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

Make it myself? But I'm a physical organic chemist!


computers / comp.os.vms / Basic again

SubjectAuthor
* Basic againArne Vajhøj
+* Re: Basic againDave Froble
|`* Re: Basic againArne Vajhøj
| `* Re: Basic againSimon Clubley
|  +* Re: Basic againChris Townley
|  |+* Re: Basic againArne Vajhøj
|  ||+* Re: Basic againSimon Clubley
|  |||`- Re: Basic againArne Vajhøj
|  ||`* Re: Basic againLawrence D'Oliveiro
|  || `* Re: Basic againArne Vajhøj
|  ||  `- Re: Basic againLawrence D'Oliveiro
|  |`* Re: Basic againbill
|  | `* Re: Basic againSingle Stage to Orbit
|  |  `- Re: Basic againArne Vajhøj
|  `* Re: Basic againArne Vajhøj
|   `- Re: Basic againDave Froble
+* Re: Basic againLawrence D'Oliveiro
|`* Re: Basic againArne Vajhøj
| +* Re: Basic againDan Cross
| |`* Re: Basic againDave Froble
| | `- Re: Basic againDan Cross
| `- Re: Basic againLawrence D'Oliveiro
`* Re: Basic againCraig A. Berry
 `- Re: Basic againArne Vajhøj

1
Basic again

<usllaf$38d6b$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=33694&group=comp.os.vms#33694

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: arne@vajhoej.dk (Arne Vajhøj)
Newsgroups: comp.os.vms
Subject: Basic again
Date: Sun, 10 Mar 2024 21:04:15 -0400
Organization: A noiseless patient Spider
Lines: 38
Message-ID: <usllaf$38d6b$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 11 Mar 2024 01:04:15 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="9dd7c6ab7166281cf51a9301b5704120";
logging-data="3421387"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+vt89A4R25IKSFSPxRN25UFp9aTWVchGs="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:gbqGz/NTgp+JjY3/7h1z7PJfN5I=
Content-Language: en-US
 by: Arne Vajhøj - Mon, 11 Mar 2024 01:04 UTC

My lack of skills in VMS Basic are back to haunt me.

$ type z.pas
program z(input,output);

begin
writeln('XXX');
writeln('YYY' + chr(13) + chr(10));
writeln('ZZZ');
end.
$ pas z
$ link z
$ r z
XXX
YYY

ZZZ
$ type z.bas
program z

print "XXX"
print "YYY" + chr$(13) + chr$(10)
print "ZZZ"

end program
$ bas z
$ link z
$ run z
XXX
YYY
ZZZ

Why are there no empty line between YYY and ZZZ in the Basic
example??

(VMS Basic 1.8 on VMS Alpha)

Arne

Re: Basic again

<uslo72$390jg$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=33695&group=comp.os.vms#33695

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: davef@tsoft-inc.com (Dave Froble)
Newsgroups: comp.os.vms
Subject: Re: Basic again
Date: Sun, 10 Mar 2024 21:53:46 -0400
Organization: A noiseless patient Spider
Lines: 92
Message-ID: <uslo72$390jg$1@dont-email.me>
References: <usllaf$38d6b$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 11 Mar 2024 01:53:38 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="228a8ea6ee098abe0d2b88fb54098671";
logging-data="3441264"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/brgTJdZDUrv/rCSY1Cd81l9ypW3xSsSk="
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:cGbFLkZa5IkjnCIVrvLsEXnxAH4=
In-Reply-To: <usllaf$38d6b$1@dont-email.me>
 by: Dave Froble - Mon, 11 Mar 2024 01:53 UTC

On 3/10/2024 9:04 PM, Arne Vajhøj wrote:
> My lack of skills in VMS Basic are back to haunt me.
>
> $ type z.pas
> program z(input,output);
>
> begin
> writeln('XXX');
> writeln('YYY' + chr(13) + chr(10));
> writeln('ZZZ');
> end.
> $ pas z
> $ link z
> $ r z
> XXX
> YYY
>
> ZZZ
> $ type z.bas
> program z
>
> print "XXX"
> print "YYY" + chr$(13) + chr$(10)
> print "ZZZ"
>
> end program
> $ bas z
> $ link z
> $ run z
> XXX
> YYY
> ZZZ
>
> Why are there no empty line between YYY and ZZZ in the Basic
> example??
>
> (VMS Basic 1.8 on VMS Alpha)
>
> Arne

Interesting behavior ...

So, some delimiters to see what is happening. One could also write to a file,
then open it with EDT and see the actual characters.

print "(ZZZ)"; "("; CR; ")"; "("; LF; ")"
)(ZZ)(
)

So, what happens above, up to the CR the data is printed, then the CR does just
that, moves the cursor back to the left, then data up to the LF is printed, then
the LF happens, and the last character is displayed. Note, the LF will advance
the line, but does not return the cursor to the left.

Ok, this program writes to a file, then the data is displayed in EDT, then the
file is typed.

1 Open "Y.Y" For Output as File #1%

Print #1%, "<"; "ZZZ"; ">"; "<"; CR; ">"; "<"; LF; ">"

Close #1
End

<ZZZ><<CR>><<LF>>

Note that the CR is depicted as <CR> and the LF is depicted as <LF> in EDT.

$ type y.y
><ZZ><
>

The first 6 characters are displayed <ZZZ><
Then the CR happens, cursor is then at column 1
Then the >< is displayed, cursor is now in column 3
Then the LF happens
Then the last character, >, is displayed

Funny things happen when CR and LF are embedded in text on a display.

:-)

In your example, the CR can return the cursor to column 1, but it appears the LF
doesn't give you the extra blank line. I can only guess that the print
statement might not add a second LF. A bit strange.

--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: davef@tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486

Re: Basic again

<uslqk7$39bac$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=33696&group=comp.os.vms#33696

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: arne@vajhoej.dk (Arne Vajhøj)
Newsgroups: comp.os.vms
Subject: Re: Basic again
Date: Sun, 10 Mar 2024 22:34:48 -0400
Organization: A noiseless patient Spider
Lines: 74
Message-ID: <uslqk7$39bac$1@dont-email.me>
References: <usllaf$38d6b$1@dont-email.me> <uslo72$390jg$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 11 Mar 2024 02:34:47 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="9dd7c6ab7166281cf51a9301b5704120";
logging-data="3452236"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Ugy7U5CyKp9lERre29xWq4Uvn5cN5GkQ="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:qFA4KwETJ0QV08rF3iKQqePL2t4=
Content-Language: en-US
In-Reply-To: <uslo72$390jg$1@dont-email.me>
 by: Arne Vajhøj - Mon, 11 Mar 2024 02:34 UTC

On 3/10/2024 9:53 PM, Dave Froble wrote:
> On 3/10/2024 9:04 PM, Arne Vajhøj wrote:
>> My lack of skills in VMS Basic are back to haunt me.
>>
>> $ type z.pas
>> program z(input,output);
>>
>> begin
>>    writeln('XXX');
>>    writeln('YYY' + chr(13) + chr(10));
>>    writeln('ZZZ');
>> end.
>> $ pas z
>> $ link z
>> $ r z
>> XXX
>> YYY
>>
>> ZZZ
>> $ type z.bas
>> program z
>>
>> print "XXX"
>> print "YYY" + chr$(13) + chr$(10)
>> print "ZZZ"
>>
>> end program
>> $ bas z
>> $ link z
>> $ run z
>> XXX
>> YYY
>> ZZZ
>>
>> Why are there no empty line between YYY and ZZZ in the Basic
>> example??
>>
>> (VMS Basic 1.8 on VMS Alpha)
>
> Interesting behavior ...

> Funny things happen when CR and LF are embedded in text on a display.
>
> :-)
>
> In your example, the CR can return the cursor to column 1, but it
> appears the LF doesn't give you the extra blank line.  I can only guess
> that the print statement might not add a second LF.  A bit strange.

The mystery evolves:

$ type z2.bas
program z2

print "XXX"
print "YYY" + chr$(13) + chr$(10) + chr$(10)
print "ZZZ"

end program
$ bas z2
$ link z2
$ run z2
XXX
YYY

ZZZ

1 LF => no blank line
2 LF => two blank lines

Arne

Re: Basic again

<usm4pl$3esoa$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=33697&group=comp.os.vms#33697

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.os.vms
Subject: Re: Basic again
Date: Mon, 11 Mar 2024 05:28:22 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 7
Message-ID: <usm4pl$3esoa$1@dont-email.me>
References: <usllaf$38d6b$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 11 Mar 2024 05:28:22 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="fe5a9f7bb02ca0269dd28f91ae04646f";
logging-data="3633930"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19qjkWhrVGmgmQldufLiDl3"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:BYp3G2RcLPOBEg3O/ai/0IbNe1s=
 by: Lawrence D'Oliv - Mon, 11 Mar 2024 05:28 UTC

On Sun, 10 Mar 2024 21:04:15 -0400, Arne Vajhøj wrote:

> Why are there no empty line between YYY and ZZZ in the Basic example??

Because two different language implementation teams came to two different
decisions about how to map character streams onto VMS’ insistence that
files be made out of records.

Re: Basic again

<usn01r$3kev1$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=33698&group=comp.os.vms#33698

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: clubley@remove_me.eisner.decus.org-Earth.UFP (Simon Clubley)
Newsgroups: comp.os.vms
Subject: Re: Basic again
Date: Mon, 11 Mar 2024 13:13:31 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 52
Message-ID: <usn01r$3kev1$1@dont-email.me>
References: <usllaf$38d6b$1@dont-email.me> <uslo72$390jg$1@dont-email.me> <uslqk7$39bac$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 11 Mar 2024 13:13:31 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="8a79355d1e66558529ea25920c937026";
logging-data="3816417"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/RjZAbqUG0IjzkOAwvAQ6G7D7h4qp1Kvk="
User-Agent: slrn/0.9.8.1 (VMS/Multinet)
Cancel-Lock: sha1:4zuskKca1cVIVavYBNkW3mhji7k=
 by: Simon Clubley - Mon, 11 Mar 2024 13:13 UTC

On 2024-03-10, Arne Vajhøj <arne@vajhoej.dk> wrote:
>
> The mystery evolves:
>
> $ type z2.bas
> program z2
>
> print "XXX"
> print "YYY" + chr$(13) + chr$(10) + chr$(10)
> print "ZZZ"
>
> end program
> $ bas z2
> $ link z2
> $ run z2
> XXX
> YYY
>
>
> ZZZ
>
> 1 LF => no blank line
> 2 LF => two blank lines
>

Your basic assumptions may be wrong (or they be right). Run the following
command procedure and note where the cursor stops during the 5 second pause.

$ type arne.com
$ write sys$output "Line 1"
$ wait 0:00:05
$ write sys$output "Line 2"
$ @arne
Line 1
Line 2

Now turn that into a Basic program. During the 5 second pause, does the
cursor stop at the beginning of the first line or does it stop on the
line _below_ the first line ?

If it's the latter, carry on as I have no useful suggestions.

If it's the former, rewrite your tests as LF + text + CR, instead of
text + CR + LF. That makes your testing compatible with the way VMS
outputs lines of text by default. What I don't know is if VMS Basic
uses that same model.

Simon.

--
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.

Re: Basic again

<usn0f2$3isja$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=33700&group=comp.os.vms#33700

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: news@cct-net.co.uk (Chris Townley)
Newsgroups: comp.os.vms
Subject: Re: Basic again
Date: Mon, 11 Mar 2024 13:20:33 +0000
Organization: A noiseless patient Spider
Lines: 71
Message-ID: <usn0f2$3isja$1@dont-email.me>
References: <usllaf$38d6b$1@dont-email.me> <uslo72$390jg$1@dont-email.me>
<uslqk7$39bac$1@dont-email.me> <usn01r$3kev1$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 11 Mar 2024 13:20:34 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="0ffb59bcc9dec2d8979961683c34c79c";
logging-data="3764842"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX185d7/pYv7aIjjvnyWQcq1iMAloruT/k6c="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:FtDqykrAiEdoWSyPtKmhhF8O+Yo=
Content-Language: en-GB
In-Reply-To: <usn01r$3kev1$1@dont-email.me>
 by: Chris Townley - Mon, 11 Mar 2024 13:20 UTC

On 11/03/2024 13:13, Simon Clubley wrote:
> On 2024-03-10, Arne Vajhøj <arne@vajhoej.dk> wrote:
>>
>> The mystery evolves:
>>
>> $ type z2.bas
>> program z2
>>
>> print "XXX"
>> print "YYY" + chr$(13) + chr$(10) + chr$(10)
>> print "ZZZ"
>>
>> end program
>> $ bas z2
>> $ link z2
>> $ run z2
>> XXX
>> YYY
>>
>>
>> ZZZ
>>
>> 1 LF => no blank line
>> 2 LF => two blank lines
>>
>
> Your basic assumptions may be wrong (or they be right). Run the following
> command procedure and note where the cursor stops during the 5 second pause.
>
> $ type arne.com
> $ write sys$output "Line 1"
> $ wait 0:00:05
> $ write sys$output "Line 2"
> $ @arne
> Line 1
> Line 2
>
> Now turn that into a Basic program. During the 5 second pause, does the
> cursor stop at the beginning of the first line or does it stop on the
> line _below_ the first line ?
>
> If it's the latter, carry on as I have no useful suggestions.
>
> If it's the former, rewrite your tests as LF + text + CR, instead of
> text + CR + LF. That makes your testing compatible with the way VMS
> outputs lines of text by default. What I don't know is if VMS Basic
> uses that same model.
>
> Simon.
>

Surely BASIC has its own formatting. Why manually put in control
characters to confuse it?

print "XXX"
print "YYY"
print ""
print "ZZZ"

will simply give:

XXX
YYY

ZZZ

if that is what you want

--
Chris

Re: Basic again

<usn0gu$3kkpg$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=33701&group=comp.os.vms#33701

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: arne@vajhoej.dk (Arne Vajhøj)
Newsgroups: comp.os.vms
Subject: Re: Basic again
Date: Mon, 11 Mar 2024 09:21:34 -0400
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <usn0gu$3kkpg$1@dont-email.me>
References: <usllaf$38d6b$1@dont-email.me> <usm4pl$3esoa$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 11 Mar 2024 13:21:34 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="9dd7c6ab7166281cf51a9301b5704120";
logging-data="3822384"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18MsbM63ERE83TpUtm7Z2hgccO50SCmqSY="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:ajI/ev53jpkY3qv0+4BfxHOC2Aw=
Content-Language: en-US
In-Reply-To: <usm4pl$3esoa$1@dont-email.me>
 by: Arne Vajhøj - Mon, 11 Mar 2024 13:21 UTC

On 3/11/2024 1:28 AM, Lawrence D'Oliveiro wrote:
> On Sun, 10 Mar 2024 21:04:15 -0400, Arne Vajhøj wrote:
>> Why are there no empty line between YYY and ZZZ in the Basic example??
>
> Because two different language implementation teams came to two different
> decisions about how to map character streams onto VMS’ insistence that
> files be made out of records.

I see VMS Basic IO as record oriented and not stream oriented.

And I was not expecting any "mapping". I was expecting
PRINT to format an internal buffer with the data provided
and call SYS$PUT without any attempts to modify the data
provided.

The reality is observable different.

Arne

Re: Basic again

<usn0j1$bjl$1@reader1.panix.com>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=33702&group=comp.os.vms#33702

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!panix!.POSTED.spitfire.i.gajendra.net!not-for-mail
From: cross@spitfire.i.gajendra.net (Dan Cross)
Newsgroups: comp.os.vms
Subject: Re: Basic again
Date: Mon, 11 Mar 2024 13:22:41 -0000 (UTC)
Organization: PANIX Public Access Internet and UNIX, NYC
Message-ID: <usn0j1$bjl$1@reader1.panix.com>
References: <usllaf$38d6b$1@dont-email.me> <usm4pl$3esoa$1@dont-email.me> <usn0gu$3kkpg$1@dont-email.me>
Injection-Date: Mon, 11 Mar 2024 13:22:41 -0000 (UTC)
Injection-Info: reader1.panix.com; posting-host="spitfire.i.gajendra.net:166.84.136.80";
logging-data="11893"; mail-complaints-to="abuse@panix.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: cross@spitfire.i.gajendra.net (Dan Cross)
 by: Dan Cross - Mon, 11 Mar 2024 13:22 UTC

In article <usn0gu$3kkpg$1@dont-email.me>,
Arne Vajhøj <arne@vajhoej.dk> wrote:
>On 3/11/2024 1:28 AM, Lawrence D'Oliveiro wrote:
>> On Sun, 10 Mar 2024 21:04:15 -0400, Arne Vajhøj wrote:
>>> Why are there no empty line between YYY and ZZZ in the Basic example??
>>
>> Because two different language implementation teams came to two different
>> decisions about how to map character streams onto VMS’ insistence that
>> files be made out of records.
>
>I see VMS Basic IO as record oriented and not stream oriented.
>
>And I was not expecting any "mapping". I was expecting
>PRINT to format an internal buffer with the data provided
>and call SYS$PUT without any attempts to modify the data
>provided.
>
>The reality is observable different.

Please don't feed the troll.

- Dan C.

Re: Basic again

<65ef078e$0$706$14726298@news.sunsite.dk>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=33703&group=comp.os.vms#33703

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail
Date: Mon, 11 Mar 2024 09:30:54 -0400
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: Basic again
Content-Language: en-US
Newsgroups: comp.os.vms
References: <usllaf$38d6b$1@dont-email.me> <uslo72$390jg$1@dont-email.me>
<uslqk7$39bac$1@dont-email.me> <usn01r$3kev1$1@dont-email.me>
<usn0f2$3isja$1@dont-email.me>
From: arne@vajhoej.dk (Arne Vajhøj)
In-Reply-To: <usn0f2$3isja$1@dont-email.me>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 29
Message-ID: <65ef078e$0$706$14726298@news.sunsite.dk>
Organization: SunSITE.dk - Supporting Open source
NNTP-Posting-Host: 36dcc545.news.sunsite.dk
X-Trace: 1710163854 news.sunsite.dk 706 arne@vajhoej.dk/68.14.27.188:64237
X-Complaints-To: staff@sunsite.dk
 by: Arne Vajhøj - Mon, 11 Mar 2024 13:30 UTC

On 3/11/2024 9:20 AM, Chris Townley wrote:
> Surely BASIC has its own formatting. Why manually put in control
> characters to confuse it?
>
> print "XXX"
> print "YYY"
> print ""
> print "ZZZ"
>
> will simply give:
>
> XXX
> YYY
>
> ZZZ
>
> if that is what you want

The real context is a CGI script under Apache doing a
redirect.

And it seems like for whatever reasons the writes
(SYS$PUT) does not write CRLF to that whatever type of
connection back to Apache. So for Pascal I put them in manually
and it worked great. But for basic I hit a roadblock.

Arne

Re: Basic again

<l58finF7ocvU4@mid.individual.net>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=33704&group=comp.os.vms#33704

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bill.gunshannon@gmail.com (bill)
Newsgroups: comp.os.vms
Subject: Re: Basic again
Date: Mon, 11 Mar 2024 09:34:12 -0400
Lines: 81
Message-ID: <l58finF7ocvU4@mid.individual.net>
References: <usllaf$38d6b$1@dont-email.me> <uslo72$390jg$1@dont-email.me>
<uslqk7$39bac$1@dont-email.me> <usn01r$3kev1$1@dont-email.me>
<usn0f2$3isja$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net jaqd9bFbppHtQa0ENY7QIgBgVZZqEb10hCKw7iyKPSOM38aetI
Cancel-Lock: sha1:vM6zK1FYam+AaCvoA/3Ljvt1WoI= sha256:zV5PbNItCk+P6gpCJmGAV/OzJzCUGynK7+mWxI6kzww=
User-Agent: Mozilla Thunderbird
Content-Language: en-US
In-Reply-To: <usn0f2$3isja$1@dont-email.me>
 by: bill - Mon, 11 Mar 2024 13:34 UTC

On 3/11/2024 9:20 AM, Chris Townley wrote:
> On 11/03/2024 13:13, Simon Clubley wrote:
>> On 2024-03-10, Arne Vajhøj <arne@vajhoej.dk> wrote:
>>>
>>> The mystery evolves:
>>>
>>> $ type z2.bas
>>> program z2
>>>
>>> print "XXX"
>>> print "YYY" + chr$(13) + chr$(10) + chr$(10)
>>> print "ZZZ"
>>>
>>> end program
>>> $ bas z2
>>> $ link z2
>>> $ run z2
>>> XXX
>>> YYY
>>>
>>>
>>> ZZZ
>>>
>>> 1 LF => no blank line
>>> 2 LF => two blank lines
>>>
>>
>> Your basic assumptions may be wrong (or they be right). Run the following
>> command procedure and note where the cursor stops during the 5 second
>> pause.
>>
>> $ type arne.com
>> $ write sys$output "Line 1"
>> $ wait 0:00:05
>> $ write sys$output "Line 2"
>> $ @arne
>> Line 1
>> Line 2
>>
>> Now turn that into a Basic program. During the 5 second pause, does the
>> cursor stop at the beginning of the first line or does it stop on the
>> line _below_ the first line ?
>>
>> If it's the latter, carry on as I have no useful suggestions.
>>
>> If it's the former, rewrite your tests as LF + text + CR, instead of
>> text + CR + LF. That makes your testing compatible with the way VMS
>> outputs lines of text by default. What I don't know is if VMS Basic
>> uses that same model.
>>
>> Simon.
>>
>
> Surely BASIC has its own formatting. Why manually put in control
> characters to confuse it?
>
> print "XXX"
> print "YYY"
> print ""
> print "ZZZ"
>
> will simply give:
>
> XXX
> YYY
>
> ZZZ
>
> if that is what you want
>

I think what he wants is an explanation of why the behavior is
different than on any other machine. :-)

Yes, I tried it with other versions of basic and Pascal and got
the behavior Arne was looking for. Sadly, at t he moment I don't
have a VMS system running to play with it there.

bill

Re: Basic again

<usn1m9$3kev1$3@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=33705&group=comp.os.vms#33705

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: clubley@remove_me.eisner.decus.org-Earth.UFP (Simon Clubley)
Newsgroups: comp.os.vms
Subject: Re: Basic again
Date: Mon, 11 Mar 2024 13:41:29 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 40
Message-ID: <usn1m9$3kev1$3@dont-email.me>
References: <usllaf$38d6b$1@dont-email.me> <uslo72$390jg$1@dont-email.me> <uslqk7$39bac$1@dont-email.me> <usn01r$3kev1$1@dont-email.me> <usn0f2$3isja$1@dont-email.me> <65ef078e$0$706$14726298@news.sunsite.dk>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 11 Mar 2024 13:41:29 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="8a79355d1e66558529ea25920c937026";
logging-data="3816417"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19IJWpqtVJCK/JkKreHGPRrk82IuBWX9HE="
User-Agent: slrn/0.9.8.1 (VMS/Multinet)
Cancel-Lock: sha1:og/NCK39dM2uezvdHrhi0KQD+v0=
 by: Simon Clubley - Mon, 11 Mar 2024 13:41 UTC

On 2024-03-11, Arne Vajhøj <arne@vajhoej.dk> wrote:
> On 3/11/2024 9:20 AM, Chris Townley wrote:
>> Surely BASIC has its own formatting. Why manually put in control
>> characters to confuse it?
>>
>> print "XXX"
>> print "YYY"
>> print ""
>> print "ZZZ"
>>
>> will simply give:
>>
>> XXX
>> YYY
>>
>> ZZZ
>>
>> if that is what you want
>
> The real context is a CGI script under Apache doing a
> redirect.
>

You didn't mention that bit Arne. :-(

The implication from your posting was that this is an interactive
session problem. This matters because the terminal driver does a
lot of output processing on the data it is asked to display.

Now I know this, try putting your output + CR + LF into a string
and then output the string only in the print statement.

This may or may not make a difference depending on what the Basic
RTL does with the string.

Simon.

--
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.

Re: Basic again

<usn1rf$3kkpj$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=33706&group=comp.os.vms#33706

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: arne@vajhoej.dk (Arne Vajhøj)
Newsgroups: comp.os.vms
Subject: Re: Basic again
Date: Mon, 11 Mar 2024 09:44:15 -0400
Organization: A noiseless patient Spider
Lines: 73
Message-ID: <usn1rf$3kkpj$1@dont-email.me>
References: <usllaf$38d6b$1@dont-email.me> <uslo72$390jg$1@dont-email.me>
<uslqk7$39bac$1@dont-email.me> <usn01r$3kev1$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 11 Mar 2024 13:44:15 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="9dd7c6ab7166281cf51a9301b5704120";
logging-data="3822387"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+bTa8U0zZESADPAjjynIOGY3ZrTSuksvA="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:usbPBDmcbmdgAfJiaUXRMW2L27o=
In-Reply-To: <usn01r$3kev1$1@dont-email.me>
Content-Language: en-US
 by: Arne Vajhøj - Mon, 11 Mar 2024 13:44 UTC

On 3/11/2024 9:13 AM, Simon Clubley wrote:
> On 2024-03-10, Arne Vajhøj <arne@vajhoej.dk> wrote:
>> The mystery evolves:
>>
>> $ type z2.bas
>> program z2
>>
>> print "XXX"
>> print "YYY" + chr$(13) + chr$(10) + chr$(10)
>> print "ZZZ"
>>
>> end program
>> $ bas z2
>> $ link z2
>> $ run z2
>> XXX
>> YYY
>>
>>
>> ZZZ
>>
>> 1 LF => no blank line
>> 2 LF => two blank lines
>>
>
> Your basic assumptions may be wrong (or they be right). Run the following
> command procedure and note where the cursor stops during the 5 second pause.
>
> $ type arne.com
> $ write sys$output "Line 1"
> $ wait 0:00:05
> $ write sys$output "Line 2"
> $ @arne
> Line 1
> Line 2
>
> Now turn that into a Basic program. During the 5 second pause, does the
> cursor stop at the beginning of the first line or does it stop on the
> line _below_ the first line ?
>
> If it's the latter, carry on as I have no useful suggestions.
>
> If it's the former, rewrite your tests as LF + text + CR, instead of
> text + CR + LF. That makes your testing compatible with the way VMS
> outputs lines of text by default. What I don't know is if VMS Basic
> uses that same model.

$ type zhack.bas
program z

print "XXX"
print "YYY" + chr$(13)
print chr$(10) + "ZZZ"

end program
$ bas zhack
$ link zhack
$ run zhack
XXX
YYY

ZZZ

And maybe I can use that as workaround.

But I would still like to know why a trailing CR LF get
stripped away.

I really don't like the idea of RTL stripping any
of "my data" away.

Arne

Re: Basic again

<usn262$3kkpj$2@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=33707&group=comp.os.vms#33707

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: arne@vajhoej.dk (Arne Vajhøj)
Newsgroups: comp.os.vms
Subject: Re: Basic again
Date: Mon, 11 Mar 2024 09:49:54 -0400
Organization: A noiseless patient Spider
Lines: 71
Message-ID: <usn262$3kkpj$2@dont-email.me>
References: <usllaf$38d6b$1@dont-email.me> <uslo72$390jg$1@dont-email.me>
<uslqk7$39bac$1@dont-email.me> <usn01r$3kev1$1@dont-email.me>
<usn0f2$3isja$1@dont-email.me> <65ef078e$0$706$14726298@news.sunsite.dk>
<usn1m9$3kev1$3@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 11 Mar 2024 13:49:54 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="9dd7c6ab7166281cf51a9301b5704120";
logging-data="3822387"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18xPSlr4eRDU3XZzBAM9WgM7gtgL0PqPTo="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:F59Ln3PSrKYwMuCVAJA++7t5o08=
In-Reply-To: <usn1m9$3kev1$3@dont-email.me>
Content-Language: en-US
 by: Arne Vajhøj - Mon, 11 Mar 2024 13:49 UTC

On 3/11/2024 9:41 AM, Simon Clubley wrote:
> On 2024-03-11, Arne Vajhøj <arne@vajhoej.dk> wrote:
>> On 3/11/2024 9:20 AM, Chris Townley wrote:
>>> Surely BASIC has its own formatting. Why manually put in control
>>> characters to confuse it?
>>>
>>> print "XXX"
>>> print "YYY"
>>> print ""
>>> print "ZZZ"
>>>
>>> will simply give:
>>>
>>> XXX
>>> YYY
>>>
>>> ZZZ
>>>
>>> if that is what you want
>>
>> The real context is a CGI script under Apache doing a
>> redirect.
>
> You didn't mention that bit Arne. :-(

No because the problem could be recreated using a
simple standalone console program.

It is a bit easier for people that may want to test, than
to get Apache CGI up and running.

> The implication from your posting was that this is an interactive
> session problem. This matters because the terminal driver does a
> lot of output processing on the data it is asked to display.

Yes, but what about the difference with Pascal?

Pascal code-->Pascal RTL--|
|-->SYS$PUT->SYS$QIOW-->terminal driver
Basic code--->Basic RTL---|

> Now I know this, try putting your output + CR + LF into a string
> and then output the string only in the print statement.
>
> This may or may not make a difference depending on what the Basic
> RTL does with the string.

No difference.

$ type zm.bas
program zm

declare string s

print "XXX"
s = "YYY" + chr$(13) + chr$(10)
print s
print "ZZZ"

end program
$ bas zm
$ link zm
$ run zm
XXX
YYY
ZZZ

Arne

Re: Basic again

<f8acf4438ee278db08987272e5d9cf69f3d49551.camel@munted.eu>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=33708&group=comp.os.vms#33708

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: alex.buell@munted.eu (Single Stage to Orbit)
Newsgroups: comp.os.vms
Subject: Re: Basic again
Date: Mon, 11 Mar 2024 14:35:42 +0000
Organization: One very high maintenance cat
Lines: 15
Message-ID: <f8acf4438ee278db08987272e5d9cf69f3d49551.camel@munted.eu>
References: <usllaf$38d6b$1@dont-email.me> <uslo72$390jg$1@dont-email.me>
<uslqk7$39bac$1@dont-email.me> <usn01r$3kev1$1@dont-email.me>
<usn0f2$3isja$1@dont-email.me> <l58finF7ocvU4@mid.individual.net>
Reply-To: alex.buell@munted.eu
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: dont-email.me; posting-host="967232f7299c1964774962493a405741";
logging-data="3867481"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19HSRBItmpAY3enY5R2EyMxsYtCO1T373c="
User-Agent: Evolution 3.50.2
Cancel-Lock: sha1:SO5aSfxV4lKgHsC1W0roiej8Bi0=
In-Reply-To: <l58finF7ocvU4@mid.individual.net>
Autocrypt: addr=alex.buell@munted.eu; prefer-encrypt=mutual;
keydata=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
 by: Single Stage to Orbi - Mon, 11 Mar 2024 14:35 UTC

On Mon, 2024-03-11 at 09:34 -0400, bill wrote:
> I think what he wants is an explanation of why the behavior is
> different than on any other machine.  :-)
>
> Yes, I tried it with other versions of basic and Pascal and got
> the behavior Arne was looking for.  Sadly, at t he moment I don't
> have a VMS system running to play with it there.

CGI is Unix and really wants LF+CR but VMS strips away one of these
characters so it never looks like a LF+CR sequence at the other end.

All that's needed is for him to output as raw rather than "cooked".
--
Tactical Nuclear Kittens

Re: Basic again

<usnh2v$3oe9f$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=33709&group=comp.os.vms#33709

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: craigberry@nospam.mac.com (Craig A. Berry)
Newsgroups: comp.os.vms
Subject: Re: Basic again
Date: Mon, 11 Mar 2024 13:04:14 -0500
Organization: A noiseless patient Spider
Lines: 48
Message-ID: <usnh2v$3oe9f$1@dont-email.me>
References: <usllaf$38d6b$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 11 Mar 2024 18:04:15 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="6cb992a128ee83918481fe8ea743eb9b";
logging-data="3946799"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Uc0iCQ6IPfNuBtZfYX43mr61V7ZiC5Tw="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:kpgK6tFFwOGl2Vgp5P83fBEtbW0=
In-Reply-To: <usllaf$38d6b$1@dont-email.me>
Content-Language: en-US
 by: Craig A. Berry - Mon, 11 Mar 2024 18:04 UTC

On 3/10/24 8:04 PM, Arne Vajhøj wrote:
> My lack of skills in VMS Basic are back to haunt me.
>
> $ type z.pas
> program z(input,output);
>
> begin
>    writeln('XXX');
>    writeln('YYY' + chr(13) + chr(10));
>    writeln('ZZZ');
> end.
> $ pas z
> $ link z
> $ r z
> XXX
> YYY
>
> ZZZ
> $ type z.bas
> program z
>
> print "XXX"
> print "YYY" + chr$(13) + chr$(10)
> print "ZZZ"
>
> end program
> $ bas z
> $ link z
> $ run z
> XXX
> YYY
> ZZZ
>
> Why are there no empty line between YYY and ZZZ in the Basic
> example??
>
> (VMS Basic 1.8 on VMS Alpha)

I don't know the answer to your question, but the docs mention a lot of
special behavior in special circumstances, e.g., "When printing to a
terminal-format file, VSI BASIC does not write out the record until a
PRINT statement without trailing punctuation executes." Maybe the CRLF
are considered trailing punctuation? Or maybe one of the other special
rules is in effect. PRINT docs start at p. 201 here:

<https://docs.vmssoftware.com/docs/vsi-basic-for-openvms-reference-manual.pdf>

Re: Basic again

<usnl7p$3pdhc$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=33710&group=comp.os.vms#33710

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: arne@vajhoej.dk (Arne Vajhøj)
Newsgroups: comp.os.vms
Subject: Re: Basic again
Date: Mon, 11 Mar 2024 15:15:05 -0400
Organization: A noiseless patient Spider
Lines: 75
Message-ID: <usnl7p$3pdhc$1@dont-email.me>
References: <usllaf$38d6b$1@dont-email.me> <usnh2v$3oe9f$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 11 Mar 2024 19:15:05 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="9dd7c6ab7166281cf51a9301b5704120";
logging-data="3978796"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19TPwhVQgKLFIKwOyp+TA0iw4EvbulCQhE="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:MZVa9YSYmB5sa8EOUpW5UfUV15E=
In-Reply-To: <usnh2v$3oe9f$1@dont-email.me>
Content-Language: en-US
 by: Arne Vajhøj - Mon, 11 Mar 2024 19:15 UTC

On 3/11/2024 2:04 PM, Craig A. Berry wrote:
> On 3/10/24 8:04 PM, Arne Vajhøj wrote:
>> My lack of skills in VMS Basic are back to haunt me.

>> $ type z.bas
>> program z
>>
>> print "XXX"
>> print "YYY" + chr$(13) + chr$(10)
>> print "ZZZ"
>>
>> end program
>> $ bas z
>> $ link z
>> $ run z
>> XXX
>> YYY
>> ZZZ
>>
>> Why are there no empty line between YYY and ZZZ in the Basic
>> example??
>>
>> (VMS Basic 1.8 on VMS Alpha)
>
> I don't know the answer to your question, but the docs mention a lot of
> special behavior in special circumstances, e.g., "When printing to a
> terminal-format file, VSI BASIC does not write out the record until a
> PRINT statement without trailing punctuation executes."  Maybe the CRLF
> are considered trailing punctuation? Or maybe one of the other special
> rules is in effect.  PRINT docs start at p. 201 here:
>
> <https://docs.vmssoftware.com/docs/vsi-basic-for-openvms-reference-manual.pdf>

I have read it, but I got the impression that it was intended
for this:

$ type pw.bas
program pw

print "A",
print "B",
print "C"

end program
$ bas pw
$ link pw
$ run pw
A B C
$ type pw.pas
program pw(input,output);

begin
write('A');
write('B');
writeln('C');
end.
$ pas pw
$ link pw
$ run pw
ABC
$ type pw.for
program pw
write(*,'(1x,A,$)') 'A'
write(*,'(1h+,A,$)') 'B'
write(*,'(1h+,A)') 'C'
end
$ for pw
$ link pw
$ run pw
ABC

Arne

Re: Basic again

<usnllj$3pdhc$2@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=33711&group=comp.os.vms#33711

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: arne@vajhoej.dk (Arne Vajhøj)
Newsgroups: comp.os.vms
Subject: Re: Basic again
Date: Mon, 11 Mar 2024 15:22:27 -0400
Organization: A noiseless patient Spider
Lines: 52
Message-ID: <usnllj$3pdhc$2@dont-email.me>
References: <usllaf$38d6b$1@dont-email.me> <uslo72$390jg$1@dont-email.me>
<uslqk7$39bac$1@dont-email.me> <usn01r$3kev1$1@dont-email.me>
<usn0f2$3isja$1@dont-email.me> <l58finF7ocvU4@mid.individual.net>
<f8acf4438ee278db08987272e5d9cf69f3d49551.camel@munted.eu>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 11 Mar 2024 19:22:27 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="9dd7c6ab7166281cf51a9301b5704120";
logging-data="3978796"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18kK2yxArfs1hw/qWIuHe7HE7SHQwzybz0="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:VXzvozi3Yj38zHQ3FdJoydB+e94=
Content-Language: en-US
In-Reply-To: <f8acf4438ee278db08987272e5d9cf69f3d49551.camel@munted.eu>
 by: Arne Vajhøj - Mon, 11 Mar 2024 19:22 UTC

On 3/11/2024 10:35 AM, Single Stage to Orbit wrote:
> On Mon, 2024-03-11 at 09:34 -0400, bill wrote:
>> I think what he wants is an explanation of why the behavior is
>> different than on any other machine.  :-)

I wanted to know why it was different from Pascal and
different from "common expectation".

>> Yes, I tried it with other versions of basic and Pascal and got
>> the behavior Arne was looking for.  Sadly, at t he moment I don't
>> have a VMS system running to play with it there.
>
> CGI is Unix and really wants LF+CR but VMS strips away one of these
> characters so it never looks like a LF+CR sequence at the other end.
>
> All that's needed is for him to output as raw rather than "cooked".

I had one problem with CGI and Apache.

I solved that problem by sending extra CRLF with Pascal.

And then I got a new problem because that solution did not work
with Basic.

And the Basic problem can be demonstrated with plan terminal
output.

If I could solve the original CGI Apache problem in a way that
did not require extra CRLF then that would make it work for
both Pascal and Basic.

But I would still be curious to know why Basic is eating that CRLF.

For the CGI problem I used Simons suggestion and moved on.

Instead of:

print "..." + chr$(13) + chr$(10)
print ""

then:

print "..." + chr$(13)
print chr$(10) + ""

Arne

Re: Basic again

<usnq80$3qjjk$2@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=33712&group=comp.os.vms#33712

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!news.nntp4.net!news.hispagatos.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.os.vms
Subject: Re: Basic again
Date: Mon, 11 Mar 2024 20:40:33 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 5
Message-ID: <usnq80$3qjjk$2@dont-email.me>
References: <usllaf$38d6b$1@dont-email.me> <usm4pl$3esoa$1@dont-email.me>
<usn0gu$3kkpg$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 11 Mar 2024 20:40:33 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="fe5a9f7bb02ca0269dd28f91ae04646f";
logging-data="4017780"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18lUi+f7pyOjImj96J0P6uI"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:7z6z8BrWlWZcZlG8AfHGxbiGvG0=
 by: Lawrence D'Oliv - Mon, 11 Mar 2024 20:40 UTC

On Mon, 11 Mar 2024 09:21:34 -0400, Arne Vajhøj wrote:

> The reality is observable different.

That’s what I mean.

Re: Basic again

<usnr7t$3qr77$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=33713&group=comp.os.vms#33713

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: davef@tsoft-inc.com (Dave Froble)
Newsgroups: comp.os.vms
Subject: Re: Basic again
Date: Mon, 11 Mar 2024 16:57:41 -0400
Organization: A noiseless patient Spider
Lines: 89
Message-ID: <usnr7t$3qr77$1@dont-email.me>
References: <usllaf$38d6b$1@dont-email.me> <uslo72$390jg$1@dont-email.me>
<uslqk7$39bac$1@dont-email.me> <usn01r$3kev1$1@dont-email.me>
<usn1rf$3kkpj$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 11 Mar 2024 20:57:33 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="228a8ea6ee098abe0d2b88fb54098671";
logging-data="4025575"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/fqYn1R/ZrhJtfcD/Pv8Y3KxVVRT7B5JQ="
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:hff4rfS6pjI8q0Ff85Loyc0VnMM=
In-Reply-To: <usn1rf$3kkpj$1@dont-email.me>
 by: Dave Froble - Mon, 11 Mar 2024 20:57 UTC

On 3/11/2024 9:44 AM, Arne Vajhøj wrote:
> On 3/11/2024 9:13 AM, Simon Clubley wrote:
>> On 2024-03-10, Arne Vajhøj <arne@vajhoej.dk> wrote:
>>> The mystery evolves:
>>>
>>> $ type z2.bas
>>> program z2
>>>
>>> print "XXX"
>>> print "YYY" + chr$(13) + chr$(10) + chr$(10)
>>> print "ZZZ"
>>>
>>> end program
>>> $ bas z2
>>> $ link z2
>>> $ run z2
>>> XXX
>>> YYY
>>>
>>>
>>> ZZZ
>>>
>>> 1 LF => no blank line
>>> 2 LF => two blank lines
>>>
>>
>> Your basic assumptions may be wrong (or they be right). Run the following
>> command procedure and note where the cursor stops during the 5 second pause.
>>
>> $ type arne.com
>> $ write sys$output "Line 1"
>> $ wait 0:00:05
>> $ write sys$output "Line 2"
>> $ @arne
>> Line 1
>> Line 2
>>
>> Now turn that into a Basic program. During the 5 second pause, does the
>> cursor stop at the beginning of the first line or does it stop on the
>> line _below_ the first line ?
>>
>> If it's the latter, carry on as I have no useful suggestions.
>>
>> If it's the former, rewrite your tests as LF + text + CR, instead of
>> text + CR + LF. That makes your testing compatible with the way VMS
>> outputs lines of text by default. What I don't know is if VMS Basic
>> uses that same model.
>
> $ type zhack.bas
> program z
>
> print "XXX"
> print "YYY" + chr$(13)
> print chr$(10) + "ZZZ"
>
> end program
> $ bas zhack
> $ link zhack
> $ run zhack
> XXX
> YYY
>
> ZZZ
>
> And maybe I can use that as workaround.
>
> But I would still like to know why a trailing CR LF get
> stripped away.
>
> I really don't like the idea of RTL stripping any
> of "my data" away.
>
> Arne
>

I'm pretty sure it is the PRINT statement. I'm guessing it thinks it know
better than you.

:-)

I write that because if you omit both the PRINT and the terminal driver, by
printing to a file, you will see the file has exactly what you intended.

--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: davef@tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486

Re: Basic again

<usnrba$3qr77$2@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=33714&group=comp.os.vms#33714

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: davef@tsoft-inc.com (Dave Froble)
Newsgroups: comp.os.vms
Subject: Re: Basic again
Date: Mon, 11 Mar 2024 16:59:32 -0400
Organization: A noiseless patient Spider
Lines: 35
Message-ID: <usnrba$3qr77$2@dont-email.me>
References: <usllaf$38d6b$1@dont-email.me> <usm4pl$3esoa$1@dont-email.me>
<usn0gu$3kkpg$1@dont-email.me> <usn0j1$bjl$1@reader1.panix.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 11 Mar 2024 20:59:22 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="228a8ea6ee098abe0d2b88fb54098671";
logging-data="4025575"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+uNNDoSi5GCX+WkDtYormMHxEefUjX/x8="
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:T49oMWh9jtXfVMOeVJ6DYdjhGig=
In-Reply-To: <usn0j1$bjl$1@reader1.panix.com>
 by: Dave Froble - Mon, 11 Mar 2024 20:59 UTC

On 3/11/2024 9:22 AM, Dan Cross wrote:
> In article <usn0gu$3kkpg$1@dont-email.me>,
> Arne Vajhøj <arne@vajhoej.dk> wrote:
>> On 3/11/2024 1:28 AM, Lawrence D'Oliveiro wrote:
>>> On Sun, 10 Mar 2024 21:04:15 -0400, Arne Vajhøj wrote:
>>>> Why are there no empty line between YYY and ZZZ in the Basic example??
>>>
>>> Because two different language implementation teams came to two different
>>> decisions about how to map character streams onto VMS’ insistence that
>>> files be made out of records.
>>
>> I see VMS Basic IO as record oriented and not stream oriented.
>>
>> And I was not expecting any "mapping". I was expecting
>> PRINT to format an internal buffer with the data provided
>> and call SYS$PUT without any attempts to modify the data
>> provided.
>>
>> The reality is observable different.
>
> Please don't feed the troll.
>
> - Dan C.
>

:-)

Well, this time, I think the troll is correct ...

--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: davef@tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486

Re: Basic again

<usqnc7$i40m$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=33715&group=comp.os.vms#33715

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.os.vms
Subject: Re: Basic again
Date: Tue, 12 Mar 2024 23:09:59 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 6
Message-ID: <usqnc7$i40m$1@dont-email.me>
References: <usllaf$38d6b$1@dont-email.me> <uslo72$390jg$1@dont-email.me>
<uslqk7$39bac$1@dont-email.me> <usn01r$3kev1$1@dont-email.me>
<usn0f2$3isja$1@dont-email.me> <65ef078e$0$706$14726298@news.sunsite.dk>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 12 Mar 2024 23:09:59 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="71ae5262ccd34dd01afa45cb3ad06860";
logging-data="593942"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18z3e4Y6gaHC3oC5K5nUR4s"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:IA8WoN6QIBRePljlsCwE4EQWi9I=
 by: Lawrence D'Oliv - Tue, 12 Mar 2024 23:09 UTC

On Mon, 11 Mar 2024 09:30:54 -0400, Arne Vajhøj wrote:

> The real context is a CGI script under Apache doing a redirect.

Really, using CGI? Particularly on an OS where process creation is
expensive?

Re: Basic again

<usr2fv$k6je$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=33716&group=comp.os.vms#33716

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: arne@vajhoej.dk (Arne Vajhøj)
Newsgroups: comp.os.vms
Subject: Re: Basic again
Date: Tue, 12 Mar 2024 22:19:42 -0400
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <usr2fv$k6je$1@dont-email.me>
References: <usllaf$38d6b$1@dont-email.me> <uslo72$390jg$1@dont-email.me>
<uslqk7$39bac$1@dont-email.me> <usn01r$3kev1$1@dont-email.me>
<usn0f2$3isja$1@dont-email.me> <65ef078e$0$706$14726298@news.sunsite.dk>
<usqnc7$i40m$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 13 Mar 2024 02:19:43 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="277d952c48b559cbde6fa54ec6b9a137";
logging-data="662126"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX190ZhTAHYgLY+VU2QX7ZqabNKe5oQJwAUY="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:BzbDDhTDZcHaqwvsnjCO78f2uKk=
Content-Language: en-US
In-Reply-To: <usqnc7$i40m$1@dont-email.me>
 by: Arne Vajhøj - Wed, 13 Mar 2024 02:19 UTC

On 3/12/2024 7:09 PM, Lawrence D'Oliveiro wrote:
> On Mon, 11 Mar 2024 09:30:54 -0400, Arne Vajhøj wrote:
>> The real context is a CGI script under Apache doing a redirect.
>
> Really, using CGI? Particularly on an OS where process creation is
> expensive?

All stories has a beginning.

The story about web applications start with CGI.

Arne

Re: Basic again

<usr2u0$k4gu$5@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=33717&group=comp.os.vms#33717

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.os.vms
Subject: Re: Basic again
Date: Wed, 13 Mar 2024 02:27:12 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 5
Message-ID: <usr2u0$k4gu$5@dont-email.me>
References: <usllaf$38d6b$1@dont-email.me> <uslo72$390jg$1@dont-email.me>
<uslqk7$39bac$1@dont-email.me> <usn01r$3kev1$1@dont-email.me>
<usn0f2$3isja$1@dont-email.me> <65ef078e$0$706$14726298@news.sunsite.dk>
<usqnc7$i40m$1@dont-email.me> <usr2fv$k6je$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 13 Mar 2024 02:27:12 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="71ae5262ccd34dd01afa45cb3ad06860";
logging-data="659998"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19I9Q9no5XZPSr03iAltYmz"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:7ofOVVZcPZE9sNXo4E6UGyIEmMQ=
 by: Lawrence D'Oliv - Wed, 13 Mar 2024 02:27 UTC

On Tue, 12 Mar 2024 22:19:42 -0400, Arne Vajhøj wrote:

> The story about web applications start with CGI.

That was last century.

Re: Basic again

<uss6hk$npk$1@reader1.panix.com>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=33718&group=comp.os.vms#33718

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!panix!.POSTED.spitfire.i.gajendra.net!not-for-mail
From: cross@spitfire.i.gajendra.net (Dan Cross)
Newsgroups: comp.os.vms
Subject: Re: Basic again
Date: Wed, 13 Mar 2024 12:35:00 -0000 (UTC)
Organization: PANIX Public Access Internet and UNIX, NYC
Message-ID: <uss6hk$npk$1@reader1.panix.com>
References: <usllaf$38d6b$1@dont-email.me> <usn0gu$3kkpg$1@dont-email.me> <usn0j1$bjl$1@reader1.panix.com> <usnrba$3qr77$2@dont-email.me>
Injection-Date: Wed, 13 Mar 2024 12:35:00 -0000 (UTC)
Injection-Info: reader1.panix.com; posting-host="spitfire.i.gajendra.net:166.84.136.80";
logging-data="24372"; mail-complaints-to="abuse@panix.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: cross@spitfire.i.gajendra.net (Dan Cross)
 by: Dan Cross - Wed, 13 Mar 2024 12:35 UTC

In article <usnrba$3qr77$2@dont-email.me>,
Dave Froble <davef@tsoft-inc.com> wrote:
>On 3/11/2024 9:22 AM, Dan Cross wrote:
>> In article <usn0gu$3kkpg$1@dont-email.me>,
>> Arne Vajhøj <arne@vajhoej.dk> wrote:
>>> On 3/11/2024 1:28 AM, Lawrence D'Oliveiro wrote:
>>>> On Sun, 10 Mar 2024 21:04:15 -0400, Arne Vajhøj wrote:
>>>>> Why are there no empty line between YYY and ZZZ in the Basic example??
>>>>
>>>> Because two different language implementation teams came to two different
>>>> decisions about how to map character streams onto VMS’ insistence that
>>>> files be made out of records.
>>>
>>> I see VMS Basic IO as record oriented and not stream oriented.
>>>
>>> And I was not expecting any "mapping". I was expecting
>>> PRINT to format an internal buffer with the data provided
>>> and call SYS$PUT without any attempts to modify the data
>>> provided.
>>>
>>> The reality is observable different.
>>
>> Please don't feed the troll.
>>
>> - Dan C.
>>
>
>:-)
>
>Well, this time, I think the troll is correct ...

Perhaps he is. Broken clocks, twice a day, etc.
Regardless, best not to feed him. People like that
thrive on engagement.

- Dan C.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor