[Info-vax] Basic again
Arne Vajhøj
arne at vajhoej.dk
Mon Mar 11 09:49:54 EDT 2024
On 3/11/2024 9:41 AM, Simon Clubley wrote:
> On 2024-03-11, Arne Vajhøj <arne at 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
More information about the Info-vax
mailing list