Allow to pass antoher exitcode to fail utility by command line first parameter

This commit is contained in:
Pierre Muller 2024-05-24 14:29:20 +02:00
parent 34a18adea6
commit 9f69dd28b4

View File

@ -1,5 +1,16 @@
program fail;
var
i : int64;
err : word;
begin
if paramstr(1)<>'' then
begin
val(paramstr(1),i,err);
if err<>0 then
writeln('Error with ',paramstr(1))
else
halt(i);
end;
halt(1);
end.