12-01-2015, 05:48 PM
In my program i build a string like
s := "conj (2+3*i)" and then do
r := CAS (s);
the returned r is 2-3*i with a funny looking minus sign.
But then
t := "conj (" + r + ")" gives t := "conj (2-3*i)"
But the CAS (t) fails with a major error.
At the cas window , when rentering the item with the odd minus
sign it is converted by the parser to a normal minus sign so it works.
This program shows my problem better.
Enter bbb (2+3*i) or even bbb ("2+3*i") .
It fails when trying to use return result Q (whick has funky minus sign)
EXPORT bbb(S)
BEGIN
LOCAL P,Q,R,T;
DEBUG;
P := "conj(" + S + ")";
Q := CAS(P);
R := "conj(" + Q + ")"; // using STRING (Q) doesnt help
T := CAS(R); // fails here
END;
s := "conj (2+3*i)" and then do
r := CAS (s);
the returned r is 2-3*i with a funny looking minus sign.
But then
t := "conj (" + r + ")" gives t := "conj (2-3*i)"
But the CAS (t) fails with a major error.
At the cas window , when rentering the item with the odd minus
sign it is converted by the parser to a normal minus sign so it works.
This program shows my problem better.
Enter bbb (2+3*i) or even bbb ("2+3*i") .
It fails when trying to use return result Q (whick has funky minus sign)
EXPORT bbb(S)
BEGIN
LOCAL P,Q,R,T;
DEBUG;
P := "conj(" + S + ")";
Q := CAS(P);
R := "conj(" + Q + ")"; // using STRING (Q) doesnt help
T := CAS(R); // fails here
END;