Checking if a uCalc object is the default with IsDefault

ID: 75

				
					using uCalcSoftware;

var uc = new uCalc();
var Status = uc.DefineVariable("Status As Bool");
Console.WriteLine(Status.ValueBool());

var MyuCalc = new uCalc();

Status.ValueBool(MyuCalc.IsDefault);
Console.WriteLine(uc.EvalStr("$'MyuCalc is the current default? {Status}'"));

MyuCalc.IsDefault = true;
Status.ValueBool(MyuCalc.IsDefault);

Console.WriteLine(uc.EvalStr("$'MyuCalc is the current default? {Status}'"));
				
			
False
MyuCalc is the current default? false
MyuCalc is the current default? true
				
					#include <iostream>
#include "uCalc.h"

using namespace std;
using namespace uCalcSoftware;

#define tf(IsTrue) ((IsTrue) ? "True" : "False")

int main() {
   uCalc uc;
   auto Status = uc.DefineVariable("Status As Bool");
   cout << tf(Status.ValueBool()) << endl;

   uCalc MyuCalc;

   Status.ValueBool(MyuCalc.IsDefault());
   cout << uc.EvalStr("$'MyuCalc is the current default? {Status}'") << endl;

   MyuCalc.IsDefault(true);
   Status.ValueBool(MyuCalc.IsDefault());

   cout << uc.EvalStr("$'MyuCalc is the current default? {Status}'") << endl;
}
				
			
False
MyuCalc is the current default? false
MyuCalc is the current default? true
				
					Imports System
Imports uCalcSoftware
Public Module Program
   Public Sub Main()
      Dim uc As New uCalc()
      Dim Status = uc.DefineVariable("Status As Bool")
      Console.WriteLine(Status.ValueBool())
      
      Dim MyuCalc As New uCalc()
      
      Status.ValueBool(MyuCalc.IsDefault)
      Console.WriteLine(uc.EvalStr("$'MyuCalc is the current default? {Status}'"))
      
      MyuCalc.IsDefault = true
      Status.ValueBool(MyuCalc.IsDefault)
      
      Console.WriteLine(uc.EvalStr("$'MyuCalc is the current default? {Status}'"))
   End Sub
End Module
				
			
False
MyuCalc is the current default? false
MyuCalc is the current default? true