> Nothing strange.  Basic Spad types have fixed relation to Lisp
> types.  You are not allowed to store someting different than
> Lisp integer in Spad Integer variable.  Similarely, Spad
> string must be Lisp string, Spad List must be Lisp list,
> Spad DoubleFloat must be Lisp DOUBLE-FLOAT, Spad
> Boolean must be either Lisp NIL or Lisp symbol T.
> Spad compiler, basic domains and Spad runtime support
> cooperate to ensure this.  You have broken the contract,
> and the result is as usual (hang or crash).

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

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.

when compiling the above code. Should it count as language specification
that one has to declare the type of a variable before its use?
Otherwise, in "z:=.... pretend %" the type of the right hand side is
clear, why isn't that simply taken as the type for z?

But still, if I say "z: % := ...", I still get

   compiling exported exquo : ($,$) -> Union($,failed)
Local variable G81827 lacks type.

Where does that "variable" come from?

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