summaryrefslogtreecommitdiff
path: root/fpcdocs/refex/ex74.pp
blob: a47ac4ff286c6edfd567113003e54607f8ac77a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
Program Example74;

{ Program to demonstrate the Val function. }
Var I, Code : Integer;

begin
  Val (ParamStr (1),I,Code);
  If Code<>0 then
    Writeln ('Error at position ',code,' : ',Paramstr(1)[Code])
  else
    Writeln ('Value : ',I);
end.