>> Can you point me to where exactly I have broken the contract?
>>
>> x exquo y ==
>>     zero? y => "failed"
>>     z := (INTEXQUO(x, y)$Lisp) pretend %
>>     -- or better this?
>>     -- z: % := (INTEXQUO(x, y)$Lisp) pretend %
>>     NULL(z)$Lisp => "failed"
>>     z
> 
> '%' is Integer here.  Using 'pretend' you promise that result
> of 'INTEXQUO' really is an integer.  But 'INTEXQUO' may
> return Lisp NIL, which is not an integer.

I know, but does that really matter? I then test whether INTEXQUO
returned NIL and I do this basically via the LISP NULL function, so the
actual type should not matter at all. In the end my promise "pretend %"
*is* true (just that the compiler actually should return
Union(%,"failed") and not % is somewhat a miracle to me).

So, yes, I break it temporarily, but not in a really dangerous way.

>> In fact, I think the compiler is pretty weak here. It shows
>>
>>    compiling exported exquo : ($,$) -> Union($,failed)
>> Local variable z lacks type.
>> Local variable G81827 lacks type.

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.

Ralf


-- 
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