People,
The Spad code
coerce(cd : %) : SExpression ==
c := cd.consD_cons
c case cons_fr =>
argDC := c.cons_fr
fr := convert("Fr" :: Symbol) $SExpression
argS := coerce(argDC) :: SExpression
convert([fr, argS]) $SExpression
is compiled.
And changing the last line with convert[fr, argS] $SExpression
yields the report
...
error in function coerce
(SEQ
(LET |c|
...
(|convert| ((|elt| (|SExpression|) |construct|) |fr| |argS|))))
|noBranch|))))
****** level 9 ******
$x:= (construct fr argS)
$m:= (SExpression)
$f:= ((((|argS| #) (|fr| #) (|argDC| #) (|c| # #) ...)))
>> Apparent user error:
Cannot coerce (LIST fr argS) of mode (List (SExpression))
to mode (SExpression)
--------------------------------------------------------
1. Must these () be essential here?
2. Does this code piece for conversion to SExpression look natural?
Thanks,
------
Sergei
[email protected]
--
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.