Contents of the EVALU8.DOC file
Public Domain 1990 David G. Edwards
If anyone improves this (and believe me, it can use improvement), I would
be grateful to have a copy. My address is:
David G. Edwards
Route 2 Box 3280
Nicholson, GA 30565
You should get
EVALU8.TPU for TP 5.5
TESTEVAL.PAS which should return PI
CRUNCHIT.PAS to evaluate arithmetic functions from the DOS command line
Here's the basics:
Language : Turbo Pascal 5.5
Programmer: David G. Edwards, Athens (GA) Software, Inc.
Date : Dec. 17, 1989
Purpose : The unit contains a function to accept an input string
containing an arithmetic expression and return a real number.
Summary : Modified from the March, 1989 Computer Language article "The
nuts and bolts of compiler construction" by Jack W. Crenshaw.
Restrictions: There is very little error checking. Watch the heap if the
function aborts with a non-fatal error. A couple of the
procs use the TP 'exit' procedure to jump out of a proc.
Modifications: 07/12/90 changed declaration from
function Evaluate(RawString:string) : real; to allow for
somewhat better error detection.
function Evaluate(RawString:string; var result : real) : boolean;
see Evalu8.Pas for the rest of it.