multiple batch calls in a batch file




On Wed, 15 Apr 2009, Robert Dodier wrote:

< On 4/15/09, Leo Butler <l.butler at ed.ac.uk> wrote:
< 
< > I wonder if someone can explain why this script fails to execute the
< > second `batch' statement?
< 
< It's a bug; when the first inner batch call is completed, it jumps
< out of batch, skipping the second inner batch call.
< 
< Looks like load doesn't show that same behavior -- maybe you can
< replace calls to batch with calls to load instead.
< 
< If you're bold, you can try applying the patch below which is
< supposed to keep control within batch when the inner batch call
< is completed. Seems to work for me, maybe someone else
< can try it.
< 
< Hope this helps,
< 
< Robert Dodier
< 
< PS.
< --- src/mload.lisp      3 Apr 2009 17:08:20 -0000       1.54
< +++ src/mload.lisp      16 Apr 2009 02:56:56 -0000
< @@ -203,7 +203,7 @@
<          (with-open-file (in-stream filename)
<            (format t "~%batching ~A~%"
<                    (truename in-stream))
< -          (continue in-stream demo)
< +          (catch 'macsyma-quit (continue in-stream demo))
<            (namestring in-stream)))))
< 
<  ;; Return true if $float converts both a and b to floats and
< 
< 

Robert, this patch seems to have worked for me, too. Thanks.
I note that `batchload' does not suffer from this bug.

Leo

-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.