Formatting+Input+and+Output

Introduction
As you have seen, Real Basic is a great programming environment for allowing the developer to quickly build a windows-based application. This type of environment is also sometimes called a RAD - [|Rapid Application Development].

But what about the way Real Basic presents and formats the data output? Actually, the functionality here is pretty limited. Let's take the outputting of financial data for example - some programming environments have currency functions built into their libraries to allow the conversion of numbers into currency.

Real Basic doesn't have a currency function, but it does have a the **Format** function which takes as parameters a number and the format layout and produces as output a formatted string e.g.



The string variable cash would have the value £3,560.30. Can you see how this is?


 * Zeros are placeholders that displays the digit from the value if it is present. If no digit is present, 0 (zero) is displayed in its place.
 * Hashes are placeholders that displays the digit from the value if it is present. If fewer placeholder characters are used than in the passed number, then the result is rounded.
 * Commas are placeholders that indicates that the number should be formatted with thousands separators.
 * Backslashes display the character that follows the backslash.

Task 1
Receipt