Try and except syntax ?
Posted on 2002-04-11
I've got a simple proceedure that works great untilthe user deletes the numbers in an editbox. The 'OnChange' event for the box runs this routine.
Can someone give me the correct syntax or re-write what I have written so my program doesn't crashout ? Here is the error it produces... 'exception raised in exception class EConvertError with message 'Not a valid integer'
I know why it's happening just not how to fix it.
Here is the proceedure
procedure TForm1.edfeetChange(Sender: TObject);
lbtemp:= strtoint (edfeet.text)*12;
lbtemp1:= strtoint (edinches.text);
lbresult.caption:= inttostr (lbtemp + lbtemp1);
thanks in advance