#include <iostream>
#include "uCalc.h"

using namespace std;
using namespace uCalcSoftware;

int main() {
   uCalc uc;
   // 1. Default behavior: returns 'inf'
   cout << uc.EvalStr("1e308 * 10") << endl;

   // 2. Enable error raising for overflow
   uc.Error().TrapOnOverflow(true);
   cout << uc.EvalStr("1e308 * 10") << endl;

   // 3. Disable it again to revert to default
   uc.Error().TrapOnOverflow(false);
   cout << uc.EvalStr("1e308 * 10") << endl;
}