: : : First...I don't know what the error means but...could someone please offer me a hand as to why the error is there and how I can get rid of it to finish this program. Remember, this is just a fragment so far...
: : :
: : : PROGRAM Charges;
: : : USES CRT;
: : :
: : : VAR
: : :
: : : UserAccount : String[5];
: : : PriorityCode, NumberCustomer : Integer;
: : : UseHours, HourCharge, AveCharge, PriorityCharge, TotalCharge : Real;
: : :
: : : Procedure Headings;
: : :
: : : Begin
: : :
: : : Writeln(' Apex Computer Service');
: : : Writeln;
: : : Writeln(' Account Charge');
: : : Writeln(' --------- --------');
: : :
: : : End;
: : :
: : : Procedure GetInfo;
: : :
: : : Begin
: : :
: : : Writeln(' Please Input Your User Account Number: ');
: : : Readln(UserAccount);
: : : Writeln(' Please Input Your Priority Code: ');
: : : Readln(PriorityCode);
: : : Writeln(' Please Input Your Hours of Usage: ');
: : : Readln(UseHours);
: : :
: : : End;
: : :
: : : Procedure LoopingIt;
: : :
: : : Begin
: : :
: : : WHILE UserAccount <> 'xxxxx' DO
: : :
: : : Begin
: : :
: : : IF (UseHours > 15.00) THEN
: : : HourCharge := (225.00 + (15.00 * UseHours))
: : :
: : : ELSE (UseHours > 5.00) AND (UseHours <= 15.00)
: : : HourCharge := (100.00 + (25.00 * UseHours))
: : :
: : : ELSE
: : : HourCharge := 100.00;
: : :
: : : End;
: : : End;
: : : End;
: : :
: : : BEGIN
: : :
: : : CLRSCR;
: : : Headings;
: : : GetInfo;
: : : LoopingIt;
: : : CalcCharge;
: : :
: : : END.
: : :
: : :
: :
: : Try making UserAccount a text variable. I had this same problem last week, and I converted to a text variable, and everything worked great.

: :
: : I didn't even look into the while loop, the error could still be there. Zibadian is a pretty good programmer, go with his suggestion first, and if that doesn't work, try mine. Good Luck.
: :
: : Delljohnb
: :
: :
: :
: Ty for the help, but changing the UserAccount into a text variable, it causes a type mismatch in the While Loop. Any clue why?
A text variable is used to read/write to text files, he probably meant to use a string variable instead.
And to answer your question in the other thread about what is wrong with your new CalcCharge function, you should definitely brush up on your IF-THEN-ELSE syntax, because that is definitely one problem with the code. I didn't look over it enough to see if there are others.