mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-03 08:32:18 +02:00
Allow to pass antoher exitcode to fail utility by command line first parameter
This commit is contained in:
parent
34a18adea6
commit
9f69dd28b4
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user