/*------------------------------------------------------------------------- | The software accompanies the paper | | | | Classes and Objects of Chemical Thermodynamics in Object-Oriented | | Programming. 2. A Class of Chemical Species | | | | E.B. Rudnyi | | E-mail: rudnyi@comp.chem.msu.su | | Homepages: http://www.chem.msu.su/~rudnyi/welcome.html | | | | presented at Second Electronic Computational Chemistry Conference, | | November 1995, http://hackberry.chem.niu.edu/ECCC2/ | --------------------------------------------------------------------------*/ #include #include "func_tp.h" #include "memtst.h" void print_lim_Tp(lim_Tp& t) { cout << endl << "limits " << t << "; " << "current errno " << t.errno << ", number of characters " << t.len() << endl; } int main() { memory test; lim_Tp a; print_lim_Tp(a); lim_Tp b("1200,1500"); print_lim_Tp(b); lim_Tp c("500,800,.1,1e6"); print_lim_Tp(c); a = b; print_lim_Tp(a); b = "300,1000,0,1e5"; print_lim_Tp(b); b.clear(); print_lim_Tp(b); do { cout << endl << "first limits for T and p (at the end put the symbol ':')" << endl; cin >> a; cout << "second limits for T and p (at the end put the symbol ':')" << endl; cin >> b; print_lim_Tp(a); print_lim_Tp(b); cout << "result of operation" << endl; cout << "(first < second) is " << (a < b) << endl; cout << "(first = second) is " << (a == b) << endl; cout << "(first > second) is " << (a > b) << endl; cout << "first.compare(second) is " << a.compare(b) << endl; cout << "cross(first, second) is " << cross(a, b) << endl; cout << "first.isin(4, 1) " << a.isin(4, 1) << endl; cout << "second.isin(4, 1) " << b.isin(4, 1) << endl; } while (a || b); return 0; }