Simple alias

ID: 57

				
					using uCalcSoftware;

var uc = new uCalc();
uc.DefineVariable("x = 10");

// Create alias: y behaves exactly like x
uc.CreateAlias("y", "x");

Console.WriteLine(uc.Eval("y + 5"));
				
			
15
				
					#include <iostream>
#include "uCalc.h"

using namespace std;
using namespace uCalcSoftware;

int main() {
   uCalc uc;
   uc.DefineVariable("x = 10");

   // Create alias: y behaves exactly like x
   uc.CreateAlias("y", "x");

   cout << uc.Eval("y + 5") << endl;
}
				
			
15
				
					Imports System
Imports uCalcSoftware
Public Module Program
   Public Sub Main()
      Dim uc As New uCalc()
      uc.DefineVariable("x = 10")
      
      '// Create alias: y behaves exactly like x
      uc.CreateAlias("y", "x")
      
      Console.WriteLine(uc.Eval("y + 5"))
   End Sub
End Module
				
			
15