Path: utzoo!attcan!uunet!wuarchive!zaphod.mps.ohio-state.edu!samsung!munnari.oz.au!metro!nuts!cc.nu.oz.au!c0037544
From: c0037544@cc.nu.oz.au
Newsgroups: comp.sys.cbm
Subject: Re: Convertion from text-BASIC to run-BASIC?
Message-ID: <2127.271491b6@cc.nu.oz.au>
Date: 11 Oct 90 05:37:26 GMT
References: <14423.27130fa4@max.u.washington.edu>
Organization: University of Newcastle
Lines: 33

In article <14423.27130fa4@max.u.washington.edu>, scott@max.u.washington.edu
writes:
> Does anyone know or have written a routine that converts
> from a BASIC program in text-format to a runnable-format?
> If so, could you explain to me how to go about in achieving
> this and/or send me the routine that already does this.
> Thanks in advance.
>  
> Sincerely,
> Scott K. Stephen

I have a routine that will do this. However at the moment I am unable to find
the exact listing. Hopefully the following information will give you an idea if
you wish to write it yourself :
The routine was a small program, with line numbers beginning at 63000 or
something, ie: numbers way out of the way of most programs. This program then
opened the file that contained the text file, and read in a line at a time.
This line was printed to the screen, and then a GOTO was printed, to the line
that read in a line of text. The program then ended, with a cursor home and two
carriage returns stuffed into the keyboard buffer. The effect of this was to
make the computer think that someone was pressing return over the line in direct
mode and so tokenising it, and sticking it into the program. The next carriage
return made the GOTO execute, and so another line was read in, and so on. When
the routine finished with an end-of-file error, all that needed to be done was
close the file and delete the routine at the end of the now tokenised and
runnable BASIC program.

-------------------------------------------------------------------------------
| David Williams       | University of Newcastle 		              |
| c0037544@cc.nu.oz.au | Department of Computer Science  (Undergrad)	      |
|-----------------------------------------------------------------------------|
|   "The decision of Random Numbers is too important to be left to chance !"  |
-------------------------------------------------------------------------------