]> www.ginac.de Git - ginac.git/commitdiff
Correct csrc output for fderivative [Grabner].
authorJens Vollinga <vollinga@thep.physik.uni-mainz.de>
Wed, 11 Jul 2007 19:53:06 +0000 (19:53 +0000)
committerJens Vollinga <vollinga@thep.physik.uni-mainz.de>
Wed, 11 Jul 2007 19:53:06 +0000 (19:53 +0000)
ginac/fderivative.cpp

index e220fe2550f0417ac322c8b01640dbd326541400..914c6bdecaa524b0469a689b9276c7a4b901326b 100644 (file)
@@ -103,12 +103,21 @@ void fderivative::print(const print_context & c, unsigned level) const
 
 void fderivative::do_print(const print_context & c, unsigned level) const
 {
-       c.s << "D[";
        paramset::const_iterator i = parameter_set.begin(), end = parameter_set.end();
        --end;
-       while (i != end)
-               c.s << *i++ << ",";
-       c.s << *i << "](" << registered_functions()[serial].name << ")";
+       if (is_a<print_csrc_double>(c)) {
+               c.s << "D_";
+               while (i != end) {
+                       c.s << *i++ << "_";
+               }
+               c.s << *i << "_" << registered_functions()[serial].name;
+       } else {
+               c.s << "D[";
+               while (i != end) {
+                       c.s << *i++ << ",";
+               }
+               c.s << *i << "](" << registered_functions()[serial].name << ")";
+       }
        printseq(c, '(', ',', ')', exprseq::precedence(), function::precedence());
 }