ResetOutputMethod

Applies to:uCalc Transform
Class:uCalc
Removes any output decoration
Syntax
ResetOutput()
Remarks
Example 1: Restoring output back to original setting

uc.SetOutput("Result = 'Answer: <' + Result + '>'")
Console.WriteLine(uc.EvalStr("10+20")) ' Returns "Answer: <30>"
Console.WriteLine(uc.EvalStr("'Hello '+'world'")) ' Returns "Answer: <Hello world>"
Console.WriteLine(uc.EvalStr("5 > 10")) ' Returns "Answer: <false>"

uc.ResetOutput(): ' This restores the output format
Console.WriteLine(uc.EvalStr("10+20")) ' Returns "30"
Console.WriteLine(uc.EvalStr("'Hello '+'world'")) ' Returns "Hello world"
Console.WriteLine(uc.EvalStr("5 > 10")) ' Returns "false"

          

uc.SetOutput("Result = 'Answer: <' + Result + '>'");
Console.WriteLine(uc.EvalStr("10+20")); // Returns "Answer: <30>";
Console.WriteLine(uc.EvalStr("'Hello '+'world'")); // Returns "Answer: <Hello world>";
Console.WriteLine(uc.EvalStr("5 > 10")); // Returns "Answer: <false>";

uc.ResetOutput();  // This restores the output format
Console.WriteLine(uc.EvalStr("10+20")); // Returns "30";
Console.WriteLine(uc.EvalStr("'Hello '+'world'")); // Returns "Hello world";
Console.WriteLine(uc.EvalStr("5 > 10")); // Returns "false";

uc.ResetOutput();

          

         uc.SetOutput('Result = "Answer: <" + Result + ">"');
         WriteLn(uc.EvalStr('10+20')); // Returns 'Answer: <30>';
         WriteLn(uc.EvalStr('"Hello "+"world"')); // Returns 'Answer: <Hello world>';
         WriteLn(uc.EvalStr('5 > 10')); // Returns 'Answer: <false>';

         uc.ResetOutput();  // This restores the output format
         WriteLn(uc.EvalStr('10+20')); // Returns '30';
         WriteLn(uc.EvalStr('"Hello "+"world"')); // Returns 'Hello world';
         WriteLn(uc.EvalStr('5 > 10')); // Returns 'false';

          

uc.SetOutput("Result = 'Answer: <' + Result + '>'");
cout << uc.EvalStr("10+20") << endl; // Returns "Answer: <30>";
cout << uc.EvalStr("'Hello '+'world'") << endl; // Returns "Answer: <Hello world>";
cout << uc.EvalStr("5 > 10") << endl; // Returns "Answer: <false>";

uc.ResetOutput();  // This restores the output format
cout << uc.EvalStr("10+20") << endl; // Returns "30";
cout << uc.EvalStr("'Hello '+'world'") << endl; // Returns "Hello world";
cout << uc.EvalStr("5 > 10") << endl; // Returns "false";

uc.ResetOutput();

          

uc.SetOutput("Result = 'Answer: <' + Result + '>'");
Console::WriteLine(uc.EvalStr("10+20")); // Returns "Answer: <30>";
Console::WriteLine(uc.EvalStr("'Hello '+'world'")); // Returns "Answer: <Hello world>";
Console::WriteLine(uc.EvalStr("5 > 10")); // Returns "Answer: <false>";

uc.ResetOutput();  // This restores the output format
Console::WriteLine(uc.EvalStr("10+20")); // Returns "30";
Console::WriteLine(uc.EvalStr("'Hello '+'world'")); // Returns "Hello world";
Console::WriteLine(uc.EvalStr("5 > 10")); // Returns "false";

uc.ResetOutput();

          
DLL import code
<DllImport(uCalcDLL, CharSet:=CharSet.Ansi, CallingConvention:=CallingConvention.Cdecl, EntryPoint:="ResetOutput")> _

Private Sub ResetOutput__(ByVal uCalcHandle As IntPtr)
End Sub
            
[DllImport(uCalcDLL, CharSet=CharSet.Ansi, CallingConvention=CallingConvention.Cdecl, EntryPoint="ResetOutput")]

protected static extern  void ResetOutput_(IntPtr uCalcHandle);
            
{DLLImport}procedure ResetOutput__(uCalcHandle: System.Pointer); cdecl; external uCalcDLL name 'ResetOutput';

            
typedef  void (* __ResetOutput)(void *uCalcHandle); 

            
[DllImport(uCalcLib, CharSet=CharSet::Ansi, CallingConvention=CallingConvention::Cdecl, EntryPoint = "ResetOutput")]

static void ResetOutput_(void *  uCalcHandle);
            
Prev | Next