Difference between revisions of "Dtostring"

From Mesham
Jump to navigationJump to search
m
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''

Revision as of 14:33, 15 April 2013

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