HyperMath

GetNumberFormat

GetNumberFormat

Previous topic Next topic No expanding text in this topic  

GetNumberFormat

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

Gets the current display format of numerical values.

Syntax

str = GetNumberFormat()

Arguments

Name

Description

 

str

A string: 'short', 'long', or 'scientific'.

Example

Syntax

 

SetNumberFormat("short")

print(PI)

print(GetNumberFormat())

SetNumberFormat("long")

print(PI)

print(GetNumberFormat())

SetNumberFormat("scientific")

print(PI)

print(GetNumberFormat())

SetNumberFormat("default")

print(PI)

print(GetNumberFormat())

Result

3.1416

short

3.14159265358979

long

3.14159e+000

scientific

3.1416

short

See Also:

SetNumberFormat