Difference between revisions of "MC-Basic:SYSTEM.DOUBLEFORMAT"

From SoftMC-Wiki
Jump to: navigation, search
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{Languages|MC-Basic:SYSTEM.DOUBLEFORMAT}}
+
{{Languages|MC-Basic:SYSTEM.DOUBLEFORMAT}}  
 
{{MC-Basic
 
{{MC-Basic
 
|SHORT FORM=
 
|SHORT FORM=
Line 13: Line 13:
 
Set the  printing format  of double-type numbers.
 
Set the  printing format  of double-type numbers.
  
1 – print  in Floating point format  (  132.555 )
+
3 - print  in Floating point number        ( 1.325550 )
 +
 
 +
2 - print  in Floating point format with 6 decimals        ( 1.325550 )
 +
 
 +
1 – print  in Floating or Exponential (best fit) point format  (  132.555 )
  
 
0 - print  in Exponential format         ( 1.325550000000000e+02 )
 
0 - print  in Exponential format         ( 1.325550000000000e+02 )
 +
 +
  
 
|TYPE=
 
|TYPE=
Line 36: Line 42:
  
 
|EXAMPLE=
 
|EXAMPLE=
Sys.DoubleFormat = 1
+
--> sys.doubleformat = 0
 +
 
 +
--> ?1.001
 +
 
 +
1.001000000000000e+00
 +
 
 +
--> sys.doubleformat = 1
 +
 
 +
--> ?1.001
 +
 
 +
1.001
 +
 
 +
--> sys.doubleformat = 2
 +
 
 +
--> ?1.001
 +
 
 +
1.001000
 +
 
 +
--> sys.doubleformat = 3
 +
 
 +
--> ?1.001
  
? Sys.DoubleFormat
+
1.001000
  
1
+
-->
  
 
|SEE ALSO=
 
|SEE ALSO=

Latest revision as of 13:32, 6 January 2021

Language: English  • 中文(简体)‎

Set the  printing format  of double-type numbers.

3 - print  in Floating point number        ( 1.325550 )

2 - print  in Floating point format with 6 decimals        ( 1.325550 )

1 – print  in Floating or Exponential (best fit) point format  (  132.555 )

0 - print  in Exponential format         ( 1.325550000000000e+02 )

Syntax

Sys.DoubleFormat = <number>

Availability

All versions

Type

<number>: Long

Range

<number>: 0, 1

Default

0

Scope

Configuration, Terminal

Examples

--> sys.doubleformat = 0

--> ?1.001

1.001000000000000e+00

--> sys.doubleformat = 1

--> ?1.001

1.001

--> sys.doubleformat = 2

--> ?1.001

1.001000

--> sys.doubleformat = 3

--> ?1.001

1.001000

-->

See Also