User Tools

Site Tools


using_28_29_20format_20extended_20functionality

This is an old revision of the document!


Using() Format Extended Functionality

Using() Format Extended Functionality

LBB supports extended functionality for the using() function as is common in many other BASIC programming languages.

#
The hash character is used to represent a digit position.
+
A plus sign at the beginning or end of the template string causes the sign (+ or -) to be printed before or after the number.
-
A minus sign at the end of the template string causes negative numbers to be printed with a trailing minus sign.

| A double asterisk at the beginning of the template string causes leading spaces to be filled with asterisks. This occupies two digit positions.
| | $$
| A double dollar (or £) sign at the beginning of the template string causes a dollar (or £) sign to be printed to the immediate left of the number.
| |
$
A $ (or £) at the beginning of the template string combines the effects of the previous two formats.
,
A comma to the left of the decimal point in the template string causes a comma to be printed between every third digit before the decimal point.

Four carets may be placed after the digit characters to specify exponential format.


For example:

print using("**$###,###.##-", -1234.567)

Outputs:

  • ***$1,234.57-
This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information
using_28_29_20format_20extended_20functionality.1522502391.txt.gz · Last modified: 2018/03/31 13:19 by 127.0.0.1