home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of Shareware - Software Farm 2
/
wosw_2.zip
/
wosw_2
/
PASCAL
/
EEV100R1.ZIP
/
TESTP2.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1992-01-03
|
886b
|
56 lines
program TestP2;
{ This is a simple test program I used for POSTFIX.PAS }
Uses
crt,
postfix;
var
MyReal : real;
MyExpr : string;
MyErr,
MyBool : boolean;
MyAddr : Str20;
begin
{init test variables}
MyErr := false;
MyBool := false;
MyReal := 0;
while not MyBool do begin
clrscr;
writeln('Postfix expression evaluator');
writeln('Enter empty expression to exit');
writeln;
writeln('Last result = ',MyReal);
writeln;
write('Expression: ');
readln(MyExpr);
if MyExpr <> '' then begin
Calculate(MyExpr,MyReal,MyErr);
if MyErr then
{couldn't find variable - this is leftover from testing w/o TD}
MyReal := -99999;
end
else
MyBool := true;
end; {while}
{deallocate linked list's memory}
DestroyList;
end. {TestI}