Level 1, lesson 1

# 1.1 Aligning numbers

You may find that printing numbers in columns (I prefer "right- aligned") can be pretty hard. That is because the standard word to print numbers ('.') prints the number and then a trailing space. That is why '.R' was added.

The word '.R' works just like '.' but instead of just printing the number with a trailing space '.R' will print the number right-aligned in a field of N characters wide. Try this and you will see the difference:

         140 . cr
         150 5 .r cr

In this example the field is five characters wide, so '150' will be printed with two leading spaces.