Formatting

Xojo Version 2021 r3.1

Description:

XOJO allows you to control the output of information with the format function. We pass the format function two parameters. The first is what we want to format and the second is the format we would like. Anything output using the format function will be output as a string.

Formats

Format Number Formatted String
#.## 1.786 1.79
#.0000 1.3 1.3000
0000 5 0005
#% 0.25 25%
###,###.## 145678.5 145,678.5
#.##e 145678.5 1.46e+05
-#.## -3.7 -3.7
+#.## 3.7 +3.7

Syntax:

Format(num, "###.00")


On This Page

More Basic Operations