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.

-- 
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 visit 
https://groups.google.com/d/msgid/fricas-devel/CAHnU2da-o%3D2L-CZw5i6hvAHm2wW%3D6a98R7Rbbj80eiPevicFAQ%40mail.gmail.com.

Reply via email to