[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Applesoft problem with reading text files
On Sep 26, 3:23 pm, Toinet <antoine.vig...@laposte.net> wrote:
> On 26 sep, 22:08, DMn2004404 <dmn2004...@gmail.com> wrote:
>
> > While writing a "ProDOS Text File Displayer" in Applesoft BASIC, I've
> > encountered a nagging problem that Applesoft BASIC has with reading
> > text files. It seems to stop reading a line of text when it encounters
> > a comma, so that when it encounters a line of text that says, say,
> > "Lorem ipsum dolor sit amet, consectetuer adipiscing elit," all that
> > BASIC will read is "Lorem ipsum dolor sit amet", ignoring the rest of
> > the line.
>
> > I probably sound stupid, but it sounds like there is a command or a
> > method that forces BASIC to read an entire line in a text file,
> > including commas. If so, what is it?
>
> > Brandon Taylor
>
> From some good documentation:
> "The INPUT statement with one variable reads all characters up to the
> next carriage return; they are all added to the variable. An INPUT
> statement with multiple variables causes all characters up to the
> first comma to be added to the first variable, characters between the
> first and second commas to be added to the second variable, and so on.
> The last variable in the INPUT statement is given all remaining
> characters up to the next carriage return. If a carriage return is
> read before characters have been assigned to all variables, characters
> are automatically taken from the next line."
>
> Use GET and you'll have your text reader. Otherwise, localize the TYPE
> extra BASIC command and use it :-)
>
> antoine
There's a TYPE command in BASIC? Wow... I only thought that was there
for MS-DOS. How exactly would I go about using the TYPE command in my
text reader?