home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #5 / Amiga Plus CD - 2000 - No. 5.iso / Tools / Dev / fpc / source / docs / refex / ex74.pp < prev    next >
Encoding:
Text File  |  2000-01-01  |  249 b   |  13 lines

  1. Program Example74;
  2.  
  3. { Program to demonstrate the Val function. }
  4. Var I, Code : Integer;
  5.  
  6. begin
  7.   Val (ParamStr (1),I,Code);
  8.   If Code<>0 then 
  9.     Writeln ('Error at position ',code,' : ',Paramstr(1)[Code])
  10.   else
  11.     Writeln ('Value : ',I);  
  12. end.
  13.