namespace global
{
public:
bool foo, bar, baz;
};
using global;
int main ()
{
foo = false;
return 0;
}
namespace global
{
public:
bool foo, bar, baz;
};
using global;
int main ()
{
foo = false;
return 0;
}
When I took my first C programming class, a few of the homework problems were of things that would probably be useful, if I ever got around to writing a BASIC from scratch. Stuff like - take an algebraic expression and convert it to a Polish expression. Evaulate a Polish expression on a stack. I don't remember "manage a symbol table" being explicitly covered, but the general idea holds from the problem of "search a list" such as an array of records for a given key string, usually for some simple application like a mailing list problem. In simpler terms you might search a symbol table for the variable "A" in order to find the value 1.23456 which you then feed into your algebraic converter, which goes to the Polish stack evaluator, and there you have a big part of your BASIC interpreter or compiler even. Well, that's where I would start. Write the BASIC interpreter in C, and then find a way to cross compile it to your target platrom. Should be pretty easy. On the other hand, it might be a bit of work to get a decent floating point package up and running for one of those old machines, that is to say, if you decide to code all of that from scratch. But then again, if you already have an old BASIC that you are tearing apart, you can probably adapt some of those routines. A few people have done some interesting things like building (in the present day), VGA cards and IDE controllers and such for such ancient machines as the Apple II. Now that would get really interesting, that is to say, if someone were to put an accelerated graphics card together, that supports OpenGL (lets say), that you could pop into an old II+ or even an S-100 system. Those old II+'s and IIe's etc. were after all great platforms for kids to learn on, given that anyone could pretty much sit down with the manual or a crib sheet and begin programming in an afternoon. As for myself, back in the day, I had a pretty easy time learning Pascal and Fortran even (punch cards on an IBM System 3 Mainframe), but when I got to C, I found the learning curve with header files, make files, linker options, dll hell, compiler options, etc, very steep - and the fact was that I didn't even bother until 32 bit came along and I wasn't being coerced into thinking about segment registers, near and far pointers, etc. Have fun. P.S. I have an old Altair 8800B that I'll probably fix up and get running some day.