BASIC interpreter in PostScript? 
Author Message
 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.                                          *
*                                                                          *
****************************************************************************



Tue, 23 Aug 2005 14:09:53 GMT  
 BASIC interpreter in PostScript?
Quote:

> Can one translate old GWBASIC programs into Postscript?

Of course. PostScript is a Turing-complete language.
What is the budget?

Quote:
> 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.computationalphysics.info/

The publisher also provides fortran versions of the programs.
What's wrong with them ?


Tue, 23 Aug 2005 22:42:29 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. New BASIC interpreter for UNIX:MOLE basic

2. BASIC CGI scripts/ source code for basic interpreter

3. Help: Basic interpreter in Basic or C

4. Printing a postscript file to a postscript printer

5. Interested in writing BASIC interpreter

6. BASIC Interpreters question...

7. Book on BASIC interpreter?

8. What To Do With a BASIC Interpreter?

9. BASIC interpreter/compiler for unix

10. HELP, Which Basic Interpreter??

11. Smallest basic interpreter, where?

12. New BASIC interpreter

 

 
Powered by phpBB® Forum Software