Difference between revisions of "Dtostring"

From Mesham
Jump to navigationJump to search
m
m (3 revisions imported)
 
(One intermediate revision by the same user not shown)
Line 9: Line 9:
  
 
  #include <string>
 
  #include <string>
  var a:=23.4352;
+
   
var c:=dtostring(a, "%.2f");
+
function void main() {
 +
    var a:=23.4352;
 +
    var c:=dtostring(a, "%.2f");
 +
};
  
 
''Since: Version 1.0''
 
''Since: Version 1.0''

Latest revision as of 15:44, 15 April 2019

Overview

The dtostring(d, a) function will convert the variable or value d into a string using the formatting supplied in a.

Example

#include <string>

function void main() {
   var a:=23.4352;
   var c:=dtostring(a, "%.2f");
};

Since: Version 1.0