[Coco] Is multiple commands per line possible in basic09

Joel Rees joel.rees at gmail.com
Sat May 15 20:33:11 EDT 2021


On Fri, May 14, 2021 at 11:27 PM <coco at jechar.ca> wrote:
>
>
> In RS-BASIC
>
> you can say
>
> X=1
> Y=2
> Z=9
>
> or
>
> X=1:Y=2:Z=9
>
> is there something similar for basic09 ?

As Bill says, the backslash continuation character is available, but
it's not recommended.

(Backslash as a continuation character is a kind of a reverse
appropriation of a Unix/C usage. Different meaning of "continuation".)

The reason it's not recommended in BASIC09 is that it buys you
nothing, unless you find vertical space abhorrent.

In most interpreted BASICs with line numbers, packing commands up on a
line like that saved a little space for program source code. In many,
it shaved a little bit of execution time off, as well.

The savings were primarily due to the space required for the line
numbers (easily four or more bytes per line) and the time required to
parse over each line number.

In BASIC09. we assume you don't use line numbers. (Unneeded in most
programs, just get in the way, etc.)

So, unless you just really find source easier to read with multiple
statements per line, no reason for it.

-- 
Joel Rees

http://reiisi.blogspot.jp/p/novels-i-am-writing.html


More information about the Coco mailing list