AZ Nomad said:
No two versions of BASIC, even from the same company are compatible.
At one point, microsoft even made visual basic incompatible with it's
last major release. BASIC is only good for throwaway code. Write it;
run it; toss it. Toss anything you learn too.
So what's your obsession over throwaway code, anyway? The whole premise of
"portable code" is silly to begin with. Yes, C _can_ be written to compile
on, say, different compilers and different OSs, but that's just /hiding/ the
throwaway bits inside #defines. That's worse than maintaining individual
copies of the same source, written specifically for their intended
compiler-OS combination, because you have to wade through #ifs, #defines and
..h's to find out what the hell is going on. In seperate copies, everything
is *there* to see, plain and simple. Between copies, the structure is
(presumably) identical, differing only in those key places which would
otherwise be #defined, so it's no harder to compare them.
By the way, I've had excellent success with the small list of programs I've
maintained between QuickBasic and FreeBASIC -qb. There are only small
differences; much of the code is directly useful. All the old stuff still
works; for instance, you automatically get a text console, and you can open
windowed graphics in a single statement.
Finally, since code always has to be rewritten to reuse it anyway, what
difference does it make what language it's in before you rewrite it? From C
to C, or C++, or Java, or to many of the other braces type languages, you
might only need to refactor some keywords to make it fit. But when you have
to rewrite the whole damn thing, it doesn't make much difference what
language it's in -- BASIC, C, Java, etc. all share the same imperative
program flow structure, and share much of the same syntax and control
statements. The program structure and algorithm flowcharts are identical.
Converting BASIC to C is very simple; the standard libraries for both are
even fairly similar (too bad BASIC has more powerful libraries!).
Tim