Ralf Hemmecke wrote:
> 
> I've added two hooks in i-syscmd.boot like this.
> 
> display l ==
>   ioHook("startSysCmd", "display")
>   displaySpad2Cmd l
>   ioHook("endSysCmd", "display")
> 
> Unfortunately, not in all cases I see the "endSysCmd" token, because for
> certain cases, the diplaSpad2Cmd function does not return, but rather
> thinks that it is wiser to call
> 
> terminateSystemCommand() ==
>     FRESH_-LINE()
>     TOK := 'END_UNIT
>     spadThrow()
> 
> in order to transfer control.

One possibility is to use code like:

display l ==
    ioHook("startSysCmd", "display")
    UNWIND_-PROTECT(displaySpad2Cmd l, ioHook("endSysCmd", "display"))

The UNWIND_-PROTECT construct makes sure that second thing is
run even in case of abnomal exit from the first part.

-- 
                              Waldek Hebisch
[email protected] 

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to