Basic distinction between a root rule and a child rule.

ID: 937

				
					using uCalcSoftware;

var uc = new uCalc();
var t = new uCalc.Transformer();
var rootRule = t.Pattern("root");
var localTransformer = rootRule.LocalTransformer;
var childRule = localTransformer.Pattern("child");

Console.WriteLine($"Is 'rootRule' a child? {rootRule.IsChildRule}");
Console.WriteLine($"Is 'childRule' a child? {childRule.IsChildRule}");
				
			
Is 'rootRule' a child? False
Is 'childRule' a child? True
				
					#include <iostream>
#include "uCalc.h"

using namespace std;
using namespace uCalcSoftware;

#define tf(IsTrue) ((IsTrue) ? "True" : "False")

int main() {
   uCalc uc;
   uCalc::Transformer t;
   auto rootRule = t.Pattern("root");
   auto localTransformer = rootRule.LocalTransformer();
   auto childRule = localTransformer.Pattern("child");

   cout << "Is 'rootRule' a child? " << tf(rootRule.IsChildRule()) << endl;
   cout << "Is 'childRule' a child? " << tf(childRule.IsChildRule()) << endl;
}
				
			
Is 'rootRule' a child? False
Is 'childRule' a child? True
				
					Imports System
Imports uCalcSoftware
Public Module Program
   Public Sub Main()
      Dim uc As New uCalc()
      Dim t As New uCalc.Transformer()
      Dim rootRule = t.Pattern("root")
      Dim localTransformer = rootRule.LocalTransformer
      Dim childRule = localTransformer.Pattern("child")
      
      Console.WriteLine($"Is 'rootRule' a child? {rootRule.IsChildRule}")
      Console.WriteLine($"Is 'childRule' a child? {childRule.IsChildRule}")
   End Sub
End Module
				
			
Is 'rootRule' a child? False
Is 'childRule' a child? True