Hello Waldek,

I just compiled this piece of code in a domain.

    modularGamma0?(x: %): Boolean ==
        for t in listOfTerms x repeat
            if not modularGamma0?(t.k) then return false
        true

    modularGamma1?(x: %): Boolean
        for t in listOfTerms x repeat
            if not modularGamma1?(t.k) then return false
        true

Obviously, I forgot to write "==" for the second function.
The compiler did not complain (which is of course inconvenient, since only at the time when I wanted to use that function, FriCAS complained that modularGamma1? was not implemented).

Obviously, the "function body" for modularGamma1? becomes an argument of the Boolean constructor and the whole expression is then just a declaration without function body.

However, I wonder, why the compiler considers this code as perfectly acceptable. It should know that Boolean is a domain constructor without arguments, right?

That brings me to a curious next question. AFAIR, Aldor is able to create two two domain constructors with different argument types but equal identifier, i.e. Foo(X: Ring) and Foo(X: Group, Y: Ring) could be defined. To my current knowledge that is not possible in SPAD, right?
Is this planned to be added?

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 fricas-devel+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/fricas-devel/95badc94-26de-4ee0-b542-e75b9f306007%40hemmecke.org.
  • [fricas-devel] compil... 'Ralf Hemmecke' via FriCAS - computer algebra system

Reply via email to