The Spad of    ... =>   error "Foo" (newline() :: OutputForm)  " Foo"

AFAIK, the function "error" expects a string as argument. What you have
given, isn't of type String.

AFAICS Spad compiler converts application of a string to
another string into concatentation of strings.  Assuming
this convertion the result is a string.

1) The line above contains newline()::OutputForm. If it had been
   ::String, I wouldn't probably have had a big problem.

2) If the compiler implicitly treats

   "a" "b"

   as "ab" then that would mean either

   a) the existence of a function
      apply: (String, String) -> String
      (or "elt" instead of "apply" since we are in SPAD instead of
      Aldor), or

   b) the SPAD compiler implements syntactic sugar to translate
      s1 s2 ... sn into concat [s1,s2,...,sn] where the si are all of
      type String, or

   c) like b) except that all si must be String literals.

I don't know for sure, but I guess that c) holds.
Adding a function "elt"/"apply" could make that compiler feature irrelevant.

Waldek, don't you think that some day the domain Literal should be part of SPAD?

Ralf

--
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