using_28_29_20format_20extended_20functionality
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| using_28_29_20format_20extended_20functionality [2018/03/31 13:19] – external edit 127.0.0.1 | using_28_29_20format_20extended_20functionality [2024/01/05 00:21] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| =====Using() Format Extended Functionality===== | =====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: |
| - | 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.\\ | | + | | # | 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 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 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 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 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 **$ (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.\\ | | + | | , | 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. | |
| - | | ^^^^\\ | + | | ˆˆˆˆ |
| - | \\ | + | |
| + | For example: | ||
| + | |||
| + | <code lb> | ||
| print using(" | print using(" | ||
| - | Outputs:\\ | + | </ |
| - | ****$1, | + | |
| + | Outputs: | ||
| + | |||
| + | < | ||
| + | ****$1, | ||
| + | </ | ||
using_28_29_20format_20extended_20functionality.1522502391.txt.gz · Last modified: 2024/01/05 00:16 (external edit)