Hi, Alexander,

> Right, the exit status is not stored anywhere. Maybe this is a design
> error, i.e. returning 'NIL' or a number from 'call' might have been a
> better choice. But changing this now would break existing programs.

That what I did to fix such design problem:
- I renamed internal function "call" to "exe",
- I made "exe" to return exit code instead to T or Nil,
- in lib.l I made function "call" which behaves like old "call".

Do you see some problems in this patch?
If no, will you accept this patch to upstream?
If no, what is your vision of fixing such problem?


diff --git lib.l lib.l
index f1bcc3f..d5bb533 100644
--- lib.l
+++ lib.l
@@ -157,0 +158,3 @@
+(de call @
+   (if (=0 (apply exe (rest))) T Nil) )
+
diff --git src64/flow.l src64/flow.l
index b28857e..ad47d83 100644
--- src64/flow.l
+++ src64/flow.l
@@ -3164,2 +3164,2 @@
-# (call 'any ..) -> flg
-(code 'doCall 2)
+# (exe 'any ..) -> cnt
+(code 'doExe 2)
@@ -3233,3 +3233,3 @@
-         or A A
-         ld E TSym  # Return 'flg'
-         ldnz E Nil
+         shl A 4  # Make short number
+         or A CNT
+         ld E A
diff --git src64/glob.l src64/glob.l
index cbf718a..a532233 100644
--- src64/glob.l
+++ src64/glob.l
@@ -303 +303 @@
-   initFun NIL       "call"      doCall
+   initFun NIL       "exe"       doExe
-- 
UNSUBSCRIBE: mailto:[email protected]?subject=Unsubscribe

Reply via email to