
BASIC interpreter in PostScript?
Can one translate old GWBASIC programs into postscript?
Old GWBASIC on an IBM PC gave one direct access to the screen and
therefore to some primitive graphics. It could also prompt the
user for input and use it for computations affecting subsequent
graphics. You could also give it counting to do to cause delays.
I know one can do graphics in PostScript and I have no doubt one can
cause delays with busywork. The RedBook (1985) has a couple of input
commands and there are a few string operators. It looks inconvenient
to use them ad hoc for this purpose. On the other hand, maybe it is
not much more difficult to write a BASIC interpreter in PostScript.
There could be one file called gwbasic.ps which would be a front end.
You would then put the BASIC program you want to run in a file mybasicprog
and execute something like
cat gwbasic.ps mybasicprog | ps
Alternatively, maybe there can be a simple C program which compiles
BASIC down to PostScript.
The application I have in mind for this is translating the BASIC programs
in Koonin's book Computational Physics, which are downloadable from:
http://www.*-*-*.com/
I've heard a lot of remarks about how primitive the programs in it appear
but I haven't seen anything yet to replace them on a Linux system. This
approach might provide a solution without having to painstakingly translate
the programs one at a time.
Ignorantly,
Allan Adler
****************************************************************************
* *
* Disclaimer: I am a guest and *not* a member of the MIT Artificial *
* Intelligence Lab. My actions and comments do not reflect *
* in any way on MIT. Moreover, I am nowhere near the Boston *
* metropolitan area. *
* *
****************************************************************************