How to set a description on a rule and then retrieve it.
ID: 871
using uCalcSoftware;
var uc = new uCalc();
var t = uc.NewTransformer();
var myRule = t.FromTo("Hello", "Hi");
myRule.Description = "Simple greeting replacement";
Console.WriteLine($"Rule Pattern: {myRule.Pattern}");
Console.Write("Rule Description: "); Console.Write(myRule.Description);
Rule Pattern: Hello
Rule Description: Simple greeting replacement using uCalcSoftware; var uc = new uCalc(); var t = uc.NewTransformer(); var myRule = t.FromTo("Hello", "Hi"); myRule.Description = "Simple greeting replacement"; Console.WriteLine($"Rule Pattern: {myRule.Pattern}"); Console.Write("Rule Description: "); Console.Write(myRule.Description);
#include
#include "uCalc.h"
using namespace std;
using namespace uCalcSoftware;
int main() {
uCalc uc;
auto t = uc.NewTransformer();
auto myRule = t.FromTo("Hello", "Hi");
myRule.Description("Simple greeting replacement");
cout << "Rule Pattern: " << myRule.Pattern() << endl;
cout << "Rule Description: " << myRule.Description();
}
Rule Pattern: Hello
Rule Description: Simple greeting replacement #include <iostream> #include "uCalc.h" using namespace std; using namespace uCalcSoftware; int main() { uCalc uc; auto t = uc.NewTransformer(); auto myRule = t.FromTo("Hello", "Hi"); myRule.Description("Simple greeting replacement"); cout << "Rule Pattern: " << myRule.Pattern() << endl; cout << "Rule Description: " << myRule.Description(); }
Imports System
Imports uCalcSoftware
Public Module Program
Public Sub Main()
Dim uc As New uCalc()
Dim t = uc.NewTransformer()
Dim myRule = t.FromTo("Hello", "Hi")
myRule.Description = "Simple greeting replacement"
Console.WriteLine($"Rule Pattern: {myRule.Pattern}")
Console.Write("Rule Description: ")
Console.Write(myRule.Description)
End Sub
End Module
Rule Pattern: Hello
Rule Description: Simple greeting replacement Imports System Imports uCalcSoftware Public Module Program Public Sub Main() Dim uc As New uCalc() Dim t = uc.NewTransformer() Dim myRule = t.FromTo("Hello", "Hi") myRule.Description = "Simple greeting replacement" Console.WriteLine($"Rule Pattern: {myRule.Pattern}") Console.Write("Rule Description: ") Console.Write(myRule.Description) End Sub End Module