Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
22
Task/Program-termination/APL/program-termination.apl
Normal file
22
Task/Program-termination/APL/program-termination.apl
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#!/usr/local/bin/apl --script --
|
||||
|
||||
⍝⍝ GNU APL script
|
||||
⍝⍝ Usage: errout.apl <code>
|
||||
⍝⍝
|
||||
⍝⍝ $ echo $? ## to see exit code
|
||||
⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝
|
||||
args ← 2↓⎕ARG~'--script' '--' ⍝⍝ strip off script args we don't need
|
||||
|
||||
err ← ⍎⊃args[1]
|
||||
|
||||
∇main
|
||||
→(0=err)/ok
|
||||
error:
|
||||
'Error! exiting.'
|
||||
⍎')off 1' ⍝⍝ NOTE: exit code arg was added to )OFF in SVN r1499 Nov 2021
|
||||
ok:
|
||||
'No error, continuing...'
|
||||
⍎')off'
|
||||
∇
|
||||
|
||||
main
|
||||
Loading…
Add table
Add a link
Reference in a new issue