Skip to content

Commit

Permalink
Allow AppInitFn to take a right arg
Browse files Browse the repository at this point in the history
  • Loading branch information
brian committed Oct 14, 2023
1 parent 3a01c5b commit 7df1728
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions Source/Jarvis.dyalog
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

rVersion
:Access public shared
r'Jarvis' '1.14.4' '2023-09-22'
r'Jarvis' '1.14.5' '2023-10-14'

Documentation
Expand Down Expand Up @@ -617,14 +617,18 @@
0 If rc8×~0msg

:If ~0AppInitFn initialization function specified?
:If 1 0 0CodeLocation.⎕AT AppInitFn result-returning niladic?
:Select CodeLocation.⎕AT AppInitFn
:Case 1 0 0 result-returning niladic?
stopIf DebugLevel 2
resCodeLocationAppInitFn run it
:If 0res
0(rc msg)2res,(res)¯1('"',(CodeLocation),'.',AppInitFn,'" did not return a 0 return code')
:EndIf
:Case 1 1 0 result-returning monadic?
stopIf DebugLevel 2
res(CodeLocationAppInitFn)⎕THIS run it
:Else
0(rc msg)8('"',(CodeLocation),'.',AppInitFn,'" is not a niladic result-returning function')
0(rc msg)8('"',(CodeLocation),'.',AppInitFn,'" is not a niladic or monadic result-returning function')
:EndSelect
:If 0res
0(rc msg)2res,(res)¯1('"',(CodeLocation),'.',AppInitFn,'" did not return a 0 return code')
:EndIf
:EndIf

Expand Down

0 comments on commit 7df1728

Please sign in to comment.