ex82.pp 331 B

1234567891011121314151617
  1. Program Example82;
  2. { This program demonstrates the StrToInt function }
  3. Uses sysutils;
  4. Begin
  5. Writeln (StrToInt('1234'));
  6. Writeln (StrToInt('-1234'));
  7. Writeln (StrToInt('0'));
  8. Try
  9. Writeln (StrToInt('12345678901234567890'));
  10. except
  11. On E : EConvertError do
  12. Writeln ('Invalid number encountered');
  13. end;
  14. End.