>
> Hi Waldek,
>
> May I ask what the problem was for this fix?
>
> On 05/18/2014 08:23 PM, [email protected] wrote:
> > diff --git a/src/interp/setvars.boot b/src/interp/setvars.boot
> > index a7ee4b6..5c28cf6 100644
> > --- a/src/interp/setvars.boot
> > +++ b/src/interp/setvars.boot
> > @@ -100,7 +100,7 @@ translateTrueFalse2YesNo x ==
> > set l ==
> > ioHook("startSysCmd", "set")
> > set1(l, $setOptions)
> > - UNWIND_-PROTECT(displaySpad2Cmd l, ioHook("endSysCmd", "set"))
> > + ioHook("endSysCmd", "set")
> >
> > set1(l,setTree) ==
> > null l => displaySetVariableSettings(setTree,"")
>
> I must admit that I added this UNWIND-PROTECT rather late, but my
> problem was, that something like
>
> )set output width 70
>
> which doesn't work because "width" is wrong in this place, gave me a
> "startSysCmd" but no "endSysCmd", so I rather blindly introduced the
> UNWIND-PROTECT trick, which seemed to work.
If you need UNWIND_-PROTECT then do:
set l ==
ioHook("startSysCmd", "set")
UNWIND_-PROTECT(set1(l, $setOptions), ioHook("endSysCmd", "set"))
UNWIND_-PROTECT(x, y) runs 'x' ensuring that whatever happens
during execution of 'x' at the end 'y' will be run. The
version you commited run 'displaySpad2Cmd l' which reported
suprious errors, for example
)set messages time on
worked, but produced error message from 'displaySpad2Cmd'.
Also, if 'set1(l, $setOptions)' throwed to toplevel, then
'UNWIND_-PROTECT' would be skipped. That is, putting
'UNWIND_-PROTECT' _after_ call has no purpose, you need
to put the call as an argument. Note that 'UNWIND_-PROTECT'
is a Lisp macro, so
y := set1(l, $setOptions)
UNWIND_-PROTECT(y, ioHook("endSysCmd", "set"))
gains nothing (reading variable is unlikely to cause error,
and that is all what UNWIND_-PROTECT sees). OTOH
UNWIND_-PROTECT(set1(l, $setOptions), ioHook("endSysCmd", "set"))
should protect the call ('UNWIND_-PROTECT' sees actual call).
--
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.