expression input

Vincent Demarcus vdemarcu at umich.edu
Wed Jul 10 20:09:24 CEST 2002


Hi guys,
first, thanks for your great package!

I am trying to let users input expressions with matrix indices in their 
expressions (like A.i). I order to try this feature, I wrote a simple 
program (see attached file try.cpp)
(compiled with gcc)

the bulk of the program consist in:
ex e("2*S.j+n", lst(S,j,n)); //(S is a symbol, j an idx, n a symbol)
cout << "ok! :" << e << endl;

I am getting the result:
ok! :2*S

which is wrong in my opinion.
Am I doing something wrong? Are there ways to get around this problem?
Thanks for your help
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: try.cpp
Url: http://www.cebix.net/pipermail/ginac-devel/attachments/20020710/e0694358/try.cpp


More information about the GiNaC-devel mailing list