[Info-vax] Basic again
    Craig A. Berry 
    craigberry at nospam.mac.com
       
    Mon Mar 11 14:04:14 EDT 2024
    
    
  
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>
    
    
More information about the Info-vax
mailing list