07-15-2003, 03:54 AM
Ok guys, this is a working version of Agamemnus' original idea. You complie this program once. It generates a one line program called eee.bas which it compiles and runs. I have a batch file called COMPILE which it invokes to compile the eee.bas program. You can make it a bit more fancy, but you can't get any simpler.
Q.E.D.
*****
Code:
rem EXPRESSION EVALUATOR --- LET BASIC DO THE WORK.
INPUT "Enter expression to evaluate ";e$
open "eee.bas" for output as #1
open "eee.exe" for output as #2 ´create so can kill.
print #1,"print "+e$
print #2,"xxx"
close
kill "eee.exe" 'In case of compile error.
shell "COMPILE eee"
cls
run "eee"
*****