mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 04:28:00 +02:00
14 lines
225 B
ObjectPascal
14 lines
225 B
ObjectPascal
var
|
|
w: Word;
|
|
Code: Integer;
|
|
begin
|
|
Val('-1',W,Code);
|
|
writeln('Code: ',Code); //outputs: 2
|
|
if Code<>1 then
|
|
halt(1);
|
|
Val('-0x1',w,Code);
|
|
writeln('Code: ',Code); //outputs: 4
|
|
if Code<>1 then
|
|
halt(2);
|
|
end.
|