[GiNaC-list] parse own function

Jan.M moeller.jan at web.de
Fri Jun 12 20:11:45 CEST 2009


hello,

i'm new to ginac and got some problems with parsing own functions:

#include <iostream>
#include <ginac/ginac.h>

using namespace std;
using namespace GiNaC;

DECLARE_FUNCTION_3P(myfct)
REGISTER_FUNCTION(myfct,dummy())


int main(int argc, char **argv){
    symbol x("x"),y("y");
    lst all;

    all = x,y;

    string str = "myfct(x,y,2)";
    ex e(str, all);
    cout  << e << endl;

    return 0;
}

--->
terminate called after throwing an instance of 'GiNaC::parse_error'
  what():  GiNaC: parse error at line 0, column 0: no function "myfct" with
3 arguments
[GiNaC::ex GiNaC::parser::parse_identifier_expr()(parser/parser.cpp:66)]

have i forgot something?  thanks in advance.

jan

-- 
View this message in context: http://www.nabble.com/parse-own-function-tp24001248p24001248.html
Sent from the Ginac - General mailing list archive at Nabble.com.



More information about the GiNaC-list mailing list