[Coco] About PRINT #1,A,B,C and INPUT #1,A,B,C

Robert Emery remery66 at gmail.com
Sat Feb 11 23:21:53 EST 2023


Of course A is different than A$... Spaces are non-numeric, so tossed.
I haven't looked at the unraveled book on the routine to understand what's
going on, but I shall.


On Sat, Feb 11, 2023, 2:38 PM Allen Huffman via Coco <coco at maltedmedia.com>
wrote:

> > On Feb 11, 2023, at 7:28 AM, Robert Emery via Coco <coco at maltedmedia.com>
> wrote:
> >
> > I'm sure when a data file is being written there's control data between
> > each variable, but you'd need a logic analyser to see it...
> > Spaces alone could not be the delimiter. The commas generate spaces, not
> > the other way around, of that makes sense.
>
>
> Yet, a dump of the file when using PRINT A,C shows nothing but spaces
> (&H20 / 32) in between the ASCII digits.
>
> > On Feb 11, 2023, at 7:37 AM, Robert Emery via Coco <coco at maltedmedia.com>
> wrote:
>
> > If spaces acted as delimiters, your READ would only get the first
> variable
> > right, while the rest would be empty or a single space.
> > -Bob
>
> If you mean READ (like DATA), that can certainly have it’s own parser
> routine that is different from INPUT from a file.
>
> 10 READ A
> 20 PRINT A
> 30 DATA 1 2 3 4 5
>
> That will print “12345”. Spaces are ignored. You can even type:
>
> A=1 2 3 4
>
> And get “1234”
>
> And you can type it that way at an input:
>
> 10 INPUT A
> 20 PRINT A
> RUN
> ?1 2 3 4
> 1234
>
> But the behavior when reading from tape (#-1) or disk (#1 to #15) devices
> must have some extra code in it to handle this.
>
>                 — Allen
>
> --
> Allen Huffman - PO Box 7634 - Urbandale IA 50323 - 515-999-0227 (vmail/TXT
> only)
> http://www.subethasoftware.com - https://www.facebook.com/subethasoftware
>
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>


More information about the Coco mailing list