[GiNaC-list] let_op(size_t ) problem

Kerson Rocha Jr. krjr11 at gmail.com
Fri Jan 20 15:27:19 CET 2006


The following code:

   symbol x("x");
   symbol y("y");
   ex test1 = x + y;

    for ( size_t i = 0 ; i != test1.nops() ; i++ )
    {

        try
        {
        cout << test1.let_op(i) << " " ;
        }
        catch(std::range_error & ba)
        {
            cout << "i = " << i << endl;
            cout << ba.what() << endl;
        }
    }

This  results:

i = 0
basic::let_op(): add has no operands
i = 1
basic::let_op(): add has no operands

Using op()  runs ok but I want change subexpressions.
I am using GiNaC 1.3.3 on Mandriva 2006.0.
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.cebix.net/pipermail/ginac-list/attachments/20060120/5dc4c01b/attachment.html


More information about the GiNaC-list mailing list