<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Sun, 26 Nov 2006 00:58:57 +0000
From   : jgh@... (Jonathan Graham Harston)
Subject: Standard file extension for BASIC 2 style code?

>Message-ID: <188641308827943@...>
 
"Thomas Harte" <thomasharte@...> wrote:
> I was just curious about whether there is any standard file extension in
> the PC/Mac world for "BBC BASIC code saved as ASCII", like .bas or .bbc
> or anything like that. At the minute I'm just exporting to files that end
 
Yes. As I said, ".bas", and quoted the Wiki entry pointing out
that you shouldn't forbid users to not use ".bas" and shouldn't
assume a file's format in input purely on it's name or type.
 
> > > The following bit of code will examine the last four bytes of an
> > > open file and determine what format it is:
[snip]
> > > This assumes that the BASIC program has not got any extra bytes
> > > appended after the final terminator.
> > 
> > Which is exactly what a lot of Acornsoft BASIC programs do have, so
> > this isn't a good test.
 
Which is why the documentation specifies that it assumes that the
BASIC program has not got any extra byte information appended
after the final terminator. If you want to examine those sorts of
files, you must use a different method.
 
Just as if I had said: this method works of positive numbers, and
somebody responds: but it doesn't work for negative numbers. Yes,
I know, which is why I said that it works for positive numbers!
 

-- 
J.G.Harston - jgh@...                - mdfs.net/User/JGH
There are three food groups: brown, green and ice cream.



<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>