Hi, showing a spad file that contains a minimal reproducible
example would be very helpful for people to debug.
If you want to debug it your self, you can utilize tools like
")trace", or ")set break break" and Ctrl-C and "backtrace"
to examine the call stack, or use the good old "printf" to debug.
From the posted snippet, I don't see a problem yet.
- Qian
On 10/19/24 9:54 PM, 'Prof. Dr. Johannes Grabmeier' via FriCAS -
computer algebra system wrote:
I am revising Partition represented by List Integer:
Rep := List Integer
rep x ==> (x @ %) pretend Rep
per x ==> (x @ Rep) pretend %
then I have a function
entries(p: %): List Integer == copy rep p
which is used for elt from Eltable(Integer, Integer):
elt(p: %, i: Integer): Integer ==
i <= 0 => error "elt requires a positive second argument."
i > #p => error "elt: second argument too large."
entries(p).i
However, this constructs an infinite loop of calls to elt. Seamingly the
elt from List Integer ( as I thinks this could should point to) is not
called, but it uses the just defined elt from Partition.
The code is fixed by explicit function call:
elt(entries(p),i)$List(Integer)
Question: What is wrong here? Or if not wrong, what is my
misunderstanding?
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/fricas-devel/71404688-49b3-4f30-b29b-dadfc171d87e%40gmail.com.