I have Delphi 3, and I am a newbie. The thing I want to know is, why doesn't this program work. It is supposed to calculate a money value. When I press F9 to run the program, it gives me this error:
Error in module Unit1: 'END.' missing at end of module.
Here is the program:
procedure TForm1.Button1Click(Sender: TObject);
subtot, vat: double;
errcode : integer;
Val(Edit1.Text, subtot, errcode );
if errcode <> 0 then
ShowMessage('You must enter a number!')
vat := subtot * 0.175;
Caption := 'VAT = $' + FloatToStr(vat);
Edit2.Text := '$'+ FloatToStr(subtot + vat);
So, what am I doing wrong here?...or if I'm not doing anything wrong; why doesn't it want to work? Please help.