On Thu, Feb 06, 2025 at 05:59:54PM +0100, Grégory Vanuxem wrote:
> Is IndexCard buggy or am I using it wrongly?
> 
> (3) -> "string".doc
> 
>    >> System error:
>    The bounding indices 7 and 6 are bad for a sequence of length 6.
> See also:
>   The ANSI Standard, Glossary entry for "bounding index designator"
>   The ANSI Standard, writeup for Issue SUBSEQ-OUT-OF-BOUNDS:IS-AN-ERROR

The above first coerces "string" to IndexCard and then tries to use
it.  From documentation of IndexCard:

    coerce : String -> %
      ++ coerce(s) converts \spad{s} into an \spad{IndexCard}.  Warning: if
      ++ \spad{s} is not of the right format then an error will occur when using
      ++ it.

AFAICS "the right format" means internal format of documentation
strings.  "string" certainly is not of this format.

> Maybe you have an example of its use in mind?

The following works for me:

os := getDatabase("o")
str := os.(name="string")
elt(str, doc)

-- 
                              Waldek Hebisch

-- 
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/Z6T-BDNaD_MBzStu%40fricas.org.

Reply via email to