Dim Int32Var = uc.DefineVariable("Int32Var As Int32")
Dim ByteVar = uc.DefineVariable("ByteVar As Byte")
Dim StrVar = uc.DefineVariable("StrVar As String")
Dim SngVar = uc.DefineVariable("SngVar As Single")
Int32Var.SetVariableValueAny("4.25"): ' Will be converted to integer
ByteVar.SetVariableValueAny("-1"): ' Will be converted to unsigned byte
StrVar.SetVariableValueAny("'Test'")
SngVar.SetVariableValueAny("1.25")
Console.WriteLine(uc.Eval("Int32Var")) ' Returns 4
Console.WriteLine(uc.Eval("ByteVar")) ' Returns 255
Console.WriteLine(uc.EvalStr("StrVar")) ' Returns "Test"
Console.WriteLine(uc.EvalStr("SngVar")) ' Returns 1.25
var Int32Var = uc.DefineVariable("Int32Var As Int32");
var ByteVar = uc.DefineVariable("ByteVar As Byte");
var StrVar = uc.DefineVariable("StrVar As String");
var SngVar = uc.DefineVariable("SngVar As Single");
Int32Var.SetVariableValueAny("4.25"); // Will be converted to integer
ByteVar.SetVariableValueAny("-1"); // Will be converted to unsigned byte
StrVar.SetVariableValueAny("'Test'");
SngVar.SetVariableValueAny("1.25");
Console.WriteLine(uc.Eval("Int32Var")); // Returns 4;
Console.WriteLine(uc.Eval("ByteVar")); // Returns 255;
Console.WriteLine(uc.EvalStr("StrVar")); // Returns "Test";
Console.WriteLine(uc.EvalStr("SngVar")); // Returns 1.25;
//var Int32Var = uc.DefineVariable('Int32Var As Int32');
//var ByteVar = uc.DefineVariable('ByteVar As Byte');
//var StrVar = uc.DefineVariable('StrVar As String');
//var SngVar = uc.DefineVariable('SngVar As Single');
Int32Var.SetVariableValueAny('4.25'); // Will be converted to integer
ByteVar.SetVariableValueAny('-1'); // Will be converted to unsigned byte
StrVar.SetVariableValueAny('"Test"');
SngVar.SetVariableValueAny('1.25');
WriteLn(uc.Eval('Int32Var')); // Returns 4;
WriteLn(uc.Eval('ByteVar')); // Returns 255;
WriteLn(uc.EvalStr('StrVar')); // Returns 'Test';
WriteLn(uc.EvalStr('SngVar')); // Returns 1.25;
auto Int32Var = uc.DefineVariable("Int32Var As Int32");
auto ByteVar = uc.DefineVariable("ByteVar As Byte");
auto StrVar = uc.DefineVariable("StrVar As String");
auto SngVar = uc.DefineVariable("SngVar As Single");
Int32Var.SetVariableValueAny("4.25"); // Will be converted to integer
ByteVar.SetVariableValueAny("-1"); // Will be converted to unsigned byte
StrVar.SetVariableValueAny("'Test'");
SngVar.SetVariableValueAny("1.25");
cout << uc.Eval("Int32Var") << endl; // Returns 4;
cout << uc.Eval("ByteVar") << endl; // Returns 255;
cout << uc.EvalStr("StrVar") << endl; // Returns "Test";
cout << uc.EvalStr("SngVar") << endl; // Returns 1.25;
auto Int32Var = uc.DefineVariable("Int32Var As Int32");
auto ByteVar = uc.DefineVariable("ByteVar As Byte");
auto StrVar = uc.DefineVariable("StrVar As String");
auto SngVar = uc.DefineVariable("SngVar As Single");
Int32Var.SetVariableValueAny("4.25"); // Will be converted to integer
ByteVar.SetVariableValueAny("-1"); // Will be converted to unsigned byte
StrVar.SetVariableValueAny("'Test'");
SngVar.SetVariableValueAny("1.25");
Console::WriteLine(uc.Eval("Int32Var")); // Returns 4;
Console::WriteLine(uc.Eval("ByteVar")); // Returns 255;
Console::WriteLine(uc.EvalStr("StrVar")); // Returns "Test";
Console::WriteLine(uc.EvalStr("SngVar")); // Returns 1.25;
<DllImport(uCalcDLL, CharSet:=CharSet.Ansi, CallingConvention:=CallingConvention.Cdecl, EntryPoint:="SetVariableValueAny")> _
Private Sub SetVariableValueAny__(ByVal ItemHandle As IntPtr,ByVal Value As String)
End Sub
[DllImport(uCalcDLL, CharSet=CharSet.Ansi, CallingConvention=CallingConvention.Cdecl, EntryPoint="SetVariableValueAny")]
protected static extern void SetVariableValueAny_(IntPtr ItemHandle, string Value);
{DLLImport}procedure SetVariableValueAny__(ItemHandle: System.Pointer;Value: AnsiString); cdecl; external uCalcDLL name 'SetVariableValueAny';
typedef void (* __SetVariableValueAny)(void *ItemHandle, CONSTCHAR Value );
[DllImport(uCalcLib, CharSet=CharSet::Ansi, CallingConvention=CallingConvention::Cdecl, EntryPoint = "SetVariableValueAny")]
static void SetVariableValueAny_(void * ItemHandle, MARSHALSTR Value);