Re: parseAndEvalString* (very simple question)

1 view
Skip to first unread message

Grégory Vanuxem

unread,
May 19, 2026, 2:24:22 PM (8 days ago) May 19
to fricas...@googlegroups.com
Hello Waldek, *,

Simple manner to explain:

parseAndEvalToString str ==
$collectOutput:local := true
$outputLines: local := nil
$IOindex: local := nil
v := CATCH('SPAD_READER, CATCH('top_level, parseAndEvalStr str))
v = 'restart => ['"error"]
NREVERSE $outputLines

parseAndEvalToStringEqNum str ==
$collectOutput:local := true
$outputLines: local := nil
v := CATCH('SPAD_READER, CATCH('top_level, parseAndEvalStr str))
v = 'restart => ['"error"]
NREVERSE $outputLines

What about returning more than just "error"? Something like '"Error:"
str is not recognized in FriCAS'

Personally I obtain this (in a customized FriCAS terminal) in
fricas-vscode, an addon:

-> sqrtt(2)


error
->

?

In fact sqrtt(2) is to be more expressive and simpler to
understand.That was something else.

Just "error" is very special I find, I more used to:


There are no library operations named sqrtt
Use HyperDoc Browse or issue
)what op sqrtt
to learn if there is any operation containing " sqrtt " in its name.

Cannot find a definition or applicable library operation named
sqrtt with argument type(s)
PositiveInteger

Perhaps you should use "@" to indicate the required return type,
or "$" to specify which version
of the function you need.


The real command was CTRL-D

Greg

PS / Very very very bad afternoon.
Reply all
Reply to author
Forward
0 new messages