Retrieves a double-precision value from a pointer, with and without formatting.

ID: 430

See: ValueAt
				
					using uCalcSoftware;

var uc = new uCalc();
// Define a global format for the 'formattedOutput' parameter
uc.Format("Result = 'Answer: <' + Result + '>'");

// Create a variable and get its memory address
var myDouble = uc.DefineVariable("MyDouble = 123.456");
var ptr = myDouble.ValueAddr();

// 1. Retrieve the value by specifying the data type by name
Console.WriteLine($"By Name: {uc.ValueAt(ptr, "Double")}");

// 2. Retrieve the value using the built-in enum
Console.WriteLine($"By Enum: {uc.ValueAt(ptr, BuiltInType.Float_Double)}");

// 3. Retrieve the value with formatting enabled
Console.WriteLine($"Formatted: {uc.ValueAt(ptr, BuiltInType.Float_Double, true)}");
				
			
By Name: 123.456
By Enum: 123.456
Formatted: Answer: <123.456>
				
					#include <iostream>
#include "uCalc.h"

using namespace std;
using namespace uCalcSoftware;

int main() {
   uCalc uc;
   // Define a global format for the 'formattedOutput' parameter
   uc.Format("Result = 'Answer: <' + Result + '>'");

   // Create a variable and get its memory address
   auto myDouble = uc.DefineVariable("MyDouble = 123.456");
   auto ptr = myDouble.ValueAddr();

   // 1. Retrieve the value by specifying the data type by name
   cout << "By Name: " << uc.ValueAt(ptr, "Double") << endl;

   // 2. Retrieve the value using the built-in enum
   cout << "By Enum: " << uc.ValueAt(ptr, BuiltInType::Float_Double) << endl;

   // 3. Retrieve the value with formatting enabled
   cout << "Formatted: " << uc.ValueAt(ptr, BuiltInType::Float_Double, true) << endl;
}
				
			
By Name: 123.456
By Enum: 123.456
Formatted: Answer: <123.456>
				
					Imports System
Imports uCalcSoftware
Public Module Program
   Public Sub Main()
      Dim uc As New uCalc()
      '// Define a global format for the 'formattedOutput' parameter
      uc.Format("Result = 'Answer: <' + Result + '>'")
      
      '// Create a variable and get its memory address
      Dim myDouble = uc.DefineVariable("MyDouble = 123.456")
      Dim ptr = myDouble.ValueAddr()
      
      '// 1. Retrieve the value by specifying the data type by name
      Console.WriteLine($"By Name: {uc.ValueAt(ptr, "Double")}")
      
      '// 2. Retrieve the value using the built-in enum
      Console.WriteLine($"By Enum: {uc.ValueAt(ptr, BuiltInType.Float_Double)}")
      
      '// 3. Retrieve the value with formatting enabled
      Console.WriteLine($"Formatted: {uc.ValueAt(ptr, BuiltInType.Float_Double, true)}")
   End Sub
End Module
				
			
By Name: 123.456
By Enum: 123.456
Formatted: Answer: <123.456>