Demonstrates basic, one-line evaluations for numeric, string, and boolean expressions.
ID: 337
See: EvalStr
using uCalcSoftware;
var uc = new uCalc();
// Basic arithmetic
Console.WriteLine(uc.EvalStr("15 * (4 + 3)"));
// String manipulation
Console.WriteLine(uc.EvalStr("UCase('hello') + ', world!'"));
// Boolean logic
Console.WriteLine(uc.EvalStr("10 > 5 AndAlso 'a' < 'b'"));
105
HELLO, world!
true using uCalcSoftware; var uc = new uCalc(); // Basic arithmetic Console.WriteLine(uc.EvalStr("15 * (4 + 3)")); // String manipulation Console.WriteLine(uc.EvalStr("UCase('hello') + ', world!'")); // Boolean logic Console.WriteLine(uc.EvalStr("10 > 5 AndAlso 'a' < 'b'"));
#include
#include "uCalc.h"
using namespace std;
using namespace uCalcSoftware;
int main() {
uCalc uc;
// Basic arithmetic
cout << uc.EvalStr("15 * (4 + 3)") << endl;
// String manipulation
cout << uc.EvalStr("UCase('hello') + ', world!'") << endl;
// Boolean logic
cout << uc.EvalStr("10 > 5 AndAlso 'a' < 'b'") << endl;
}
105
HELLO, world!
true #include <iostream> #include "uCalc.h" using namespace std; using namespace uCalcSoftware; int main() { uCalc uc; // Basic arithmetic cout << uc.EvalStr("15 * (4 + 3)") << endl; // String manipulation cout << uc.EvalStr("UCase('hello') + ', world!'") << endl; // Boolean logic cout << uc.EvalStr("10 > 5 AndAlso 'a' < 'b'") << endl; }
Imports System
Imports uCalcSoftware
Public Module Program
Public Sub Main()
Dim uc As New uCalc()
'// Basic arithmetic
Console.WriteLine(uc.EvalStr("15 * (4 + 3)"))
'// String manipulation
Console.WriteLine(uc.EvalStr("UCase('hello') + ', world!'"))
'// Boolean logic
Console.WriteLine(uc.EvalStr("10 > 5 AndAlso 'a' < 'b'"))
End Sub
End Module
105
HELLO, world!
true Imports System Imports uCalcSoftware Public Module Program Public Sub Main() Dim uc As New uCalc() '// Basic arithmetic Console.WriteLine(uc.EvalStr("15 * (4 + 3)")) '// String manipulation Console.WriteLine(uc.EvalStr("UCase('hello') + ', world!'")) '// Boolean logic Console.WriteLine(uc.EvalStr("10 > 5 AndAlso 'a' < 'b'")) End Sub End Module