[Info-vax] Basic again
bill
bill.gunshannon at gmail.com
Mon Mar 11 09:34:12 EDT 2024
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 at 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
More information about the Info-vax
mailing list