Next: String object
Up: methods
Previous: methods
Contents
format
Description
Convert the number to string in the specification format
Syntax
Number.format(fmt)()
Parameters
- fmt
- format control string, it is the same as the format parameter of the C function "sprintf".
returns
String.
Example
Print PI:
trace(Math.PI.format("%.8f"));
//output: 3.1415926
Copyright ©2000-2010 Shanghai TopCMM Software Technologies. All Rights Reserved.