home *** CD-ROM | disk | FTP | other *** search
- Program Evaluate;
- (* 10/1189 *)
- (* Uploaded by Pat Dant *)
- (* Based on the Pascal Unit Eval that allows you to take a string
- and perform a recurssive math function on the string resulting
- in a real answer.
- This Exe version allows the command line argument to be the string
- and will print the answer on the screen at the current cursor position.*)
-
- (* ExpValue unit is designed by Don McIver in his very well written program
- SCB Checkbook Program. Currently version 4.2.*)
-
- Uses Dos, Crt, Eval;
-
- const
- EvalStrPos = 1;
-
- var
- EvalString : string;
- Answer : real;
- EvalError : Boolean;
-
- begin
- ClrScr;
- Answer := 0;
- EvalError := False;
- Answer := ExpValue(ParamStr(EvalStrPos),EvalError );
- if EvalError then begin
- Writeln('Error in Command Line Format : ',Answer:8:2);
- Halt;
- end;
- Write(Answer:8:2);
- end.
-
-