> I think is better if you do this.  Moving common functions to
> category part should be as simple as writing 'add' at end
> of SPointCategory and after that putting common functions.
> Then delete duplicates from domains.  Of course, if you
> hit some problem I will help.

I have done this, the code compiles, however when I try to call these
common functions I get the following error:

   >> System error:
   The value ((|extendedCoords| ((|List| (|DoubleFloat|)) $)) T (ELT $
11))
is not of type
  FUNCTION.

I have moved the common code from the various domains (such
SCartesian(n)) to the common category (SPointCategory). I extended
both the declarations and definitions (because SPointCategory now
contains both declarations and definitions) like this:

SCartesian(n) : Exports == Implementation where
....
  Exports ==> SPointCategory()

  Implementation ==> SPointCategory() add
....

If you need to see the full code, it is here:
https://github.com/martinbaker/fricas/blob/master/src/algebra/scene.spad.pamphlet

I compiled all this without problems but I get errors when I try to
call these common functions (such as sipnt and colinearity) like this:

(1) -> PT ==> SCartesian(2)
 
Type: Void
(2) -> sipnt(-1,-1)$PT

   >> System error:
   The value ((|extendedCoords| ((|List| (|DoubleFloat|)) $)) T (ELT $
11))
is not of type
  FUNCTION.

(2) -> a:=spnt(1.0,2.0)$PT

   (2)  ("p",1.0,2.0,1.0)
                                                          Type:
SCartesian(2)
(3) -> b:=spnt(3.0,4.0)$PT

   (3)  ("p",3.0,4.0,1.0)
                                                          Type:
SCartesian(2)
(4) -> colinearity(a,b)$PT

   >> System error:
   The value ((|extendedCoords| ((|List| (|DoubleFloat|)) $)) T (ELT $
11))
is not of type
  FUNCTION.

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/fricas-devel?hl=en.

Reply via email to