[Coco] results on INPUT vs. READ for disk files in BASIC09

Wayne Campbell asa.rand at gmail.com
Tue Jun 5 22:51:57 EDT 2018


Apparently, I was thinking of I$read, as the READ function in Basic09 reads
to a cr then stops. Forgive me for my misinformation earlier. My memory
doesn't recall everything correctly these days.


On Tue, Jun 5, 2018, 11:21 AM Wayne Campbell <asa.rand at gmail.com> wrote:

> I am almost certain that READ reads until the size of the receiving string
> is full or the end of data is reached. INPUT reads until a carraige return
> is found. However, I can't test that right now. I will test it as soon as I
> can get onto my notebook and run VCC.
>
>
> On Tue, Jun 5, 2018, 7:23 AM L. Curtis Boyle <curtisboyle at sasktel.net>
> wrote:
>
>> Wayne are you sure that you aren’t thinking of doing an I$Read Syscall
>> instead? I am pretty sure hat James is right in that READ from a file reads
>> until a carriage return.
>>
>> Sent from my iPhone
>>
>> > On Jun 5, 2018, at 7:46 AM, Wayne Campbell <asa.rand at gmail.com> wrote:
>> >
>> > You need to compare what you just wrote to what I said. I did not
>> include
>> > the portion of the READ statement that reads a DATA statement since that
>> > was not part of the discussion. The part that reads an askii record is
>> the
>> > part I was discussing. And it will read an entire file into a single
>> string
>> > if the string is long enough. You can also use get to get the entire
>> file
>> > in one chunk, rather than reading the file one bite at a time. But I do
>> > believe I remember being able to read a file and it will on one read
>> fill
>> > up an entire string if that's what you're reading into. I will have to
>> run
>> > some tests on that to determine if my memory is correct or not.
>> >
>> >> On Tue, Jun 5, 2018, 1:21 AM James Jones <jejones3141 at gmail.com>
>> wrote:
>> >>
>> >> That seems inconsistent with the BASIC09 manual (I got the printed one
>> out
>> >> this time), which says
>> >>
>> >>   - [READ] reads either an ASCII record from a sequential file or
>> device,
>> >>   or an item from a DATA statement
>> >>   - Each input record is terminated by a carriage return character.
>> >>
>> >>
>> >>> On Mon, Jun 4, 2018 at 9:22 PM, Wayne Campbell <asa.rand at gmail.com>
>> wrote:
>> >>>
>> >>> Don't forget that INPUT looks for a carraige return character to
>> >> terminate
>> >>> input. READ does not do this and can read an entire file into a
>> string,
>> >>> provided the file is shorter than the string variable.
>> >>>
>> >>>
>> >>>> On Mon, Jun 4, 2018, 2:11 PM James Jones <jejones3141 at gmail.com>
>> wrote:
>> >>>>
>> >>>> INPUT ignores the prompt if it is given a path connected to a disk
>> file
>> >>> not
>> >>>> opened for update.
>> >>>>
>> >>>> READ, if given a path, will do just as well without needing a prompt.
>> >>>>
>> >>>> --
>> >>>> Coco mailing list
>> >>>> Coco at maltedmedia.com
>> >>>> https://pairlist5.pair.net/mailman/listinfo/coco
>> >>>>
>> >>>
>> >>> --
>> >>> Coco mailing list
>> >>> Coco at maltedmedia.com
>> >>> https://pairlist5.pair.net/mailman/listinfo/coco
>> >>>
>> >>
>> >> --
>> >> Coco mailing list
>> >> Coco at maltedmedia.com
>> >> https://pairlist5.pair.net/mailman/listinfo/coco
>> >>
>> >
>> > --
>> > Coco mailing list
>> > Coco at maltedmedia.com
>> > https://pairlist5.pair.net/mailman/listinfo/coco
>> >
>>
>>
>> --
>> Coco mailing list
>> Coco at maltedmedia.com
>> https://pairlist5.pair.net/mailman/listinfo/coco
>>
>


More information about the Coco mailing list