I wrote:
>
> Ralf Hemmecke wrote:
> >
> > On 03/23/2014 09:22 AM, Ralf Hemmecke wrote:
> > > Thanks for your answer, but writing just "z:=" or "z:% :=" *makes* a
> > > difference on my computer. Without the ":%" the build will hang during
> > > doc build. So I guess the compiler generates different code.
> >
> > And indeed, it does:
> >
> > with "z := ..."
> > (SDEFUN |INT;exquo;2$U;50| ((|x| $) (|y| $) ($ |Union| $ "failed"))
> > (SPROG ((|z| NIL))
> > (SEQ
> > (COND ((ZEROP |y|) (CONS 1 "failed"))
> > (#1='T
> > (SEQ (LETT |z| (INTEXQUO |x| |y|) |INT;exquo;2$U;50|)
> > (EXIT
> > (COND ((NULL |z|) (CONS 1 "failed"))
> > (#1# |z|)))))))))
> >
> >
> > with "z: % := ..."
> > (SDEFUN |INT;exquo;2$U;50| ((|x| $) (|y| $) ($ |Union| $ "failed"))
> > (SPROG ((|z| ($)))
> > (SEQ
> > (COND ((ZEROP |y|) (CONS 1 "failed"))
> > (#1='T
> > (SEQ (LETT |z| (INTEXQUO |x| |y|) |INT;exquo;2$U;50|)
> > (EXIT
> > (COND ((NULL |z|) (CONS 1 "failed"))
> > (#1# (CONS 0 |z|))))))))))
> >
> > Main difference is in the last line.
> >
> > Looks to me as if the compiler does not automatically add the missing
> > type information ":%" to z although the "pretend %" on the right hand
> > side makes it clear what type the left hand side is supposed to have.
>
> I will look into this: the compiler clearly mixed up types here.
I can not reproduce this result: I get the same code without
explicitely declaring 'z'.
--
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.