File:  [CENS] / python / pyGiNaC / ginac_test / test_constant_swap.cpp
Revision 1.1: download - view: text, annotated - select for diffs - revision graph
Thu Nov 22 14:50:04 2001 UTC (16 years ago) by pearu
Branches: MAIN
CVS tags: HEAD
See NEWS.txt for changes. There too many changes to list them here

#include <iostream>
#include <ginac/ginac.h>
using namespace std;
using namespace GiNaC;

int main()
{
    constant c1("c1",1),c2("c2",2);
    ex x=c1;
    ex y=c2;
    cout << "x,y="<<x<<","<<y<< endl;
    cout << "(x,y).evalf()="<<x.evalf()<<","<<y.evalf()<< endl;
    x.swap(y);
    cout << "x,y="<<x<<","<<y<< endl;
    cout << "(x,y).evalf()="<<x.evalf()<<","<<y.evalf()<< endl;
    return 0;
}


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>