Setting a token data type

ID: 100

				
					using uCalcSoftware;

var uc = new uCalc();

// This example makes the # character behave the same way as quotes
uc.ExpressionTokens.Add("#([^#]*)#", TokenType.Literal, "", 1).DataType = uc.DataTypeOf("String");
Console.WriteLine(uc.EvalStr("#Hello # + #World#"));
				
			
Hello World
				
					#include <iostream>
#include "uCalc.h"

using namespace std;
using namespace uCalcSoftware;

int main() {
   uCalc uc;

   // This example makes the # character behave the same way as quotes
   uc.ExpressionTokens().Add("#([^#]*)#", TokenType::Literal, "", 1).DataType(uc.DataTypeOf("String"));
   cout << uc.EvalStr("#Hello # + #World#") << endl;
}
				
			
Hello World
				
					Imports System
Imports uCalcSoftware
Public Module Program
   Public Sub Main()
      Dim uc As New uCalc()
      
      '// This example makes the # character behave the same way as quotes
      uc.ExpressionTokens.Add("#([^#]*)#", TokenType.Literal, "", 1).DataType = uc.DataTypeOf("String")
      Console.WriteLine(uc.EvalStr("#Hello # + #World#"))
   End Sub
End Module
				
			
Hello World