format
Display format and number printing.
📝Syntax
fmt = format()
format()
format('default')
format(new_style)
📥Input Arguments
Parameter Description
new_style a string
📤Output Arguments
Parameter Description
fmt DisplayFormatOptions object: format used
📄Description

format(new_style) changes the display format and number printing of the current session.

format('default') will reset to default format (short, loose).

Styles supported:

short

long

shortE

longE

shortEng

longEng

plus

rational

hex

Line Spacing Format supported:

loose

compact

💡Examples
an example
current_style = format()
pi
format('short')
pi
format('long')
pi
format('shortE')
pi
format('longE')
pi
format('hex')
pi
format('+')
pi
format('rational')
pi
format('compact')
pi
format(current_style)
pi
🔗See Also
dispdisplay
🕔Version History
Version Description
1.0.0 initial version
Edit this page on GitHub