Level 2, lesson 4

# 2.4 How do I use TIB and PAD?

In general, you don't. The TIB is a system-related area and it is considered bad practice when you manipulate it yourself. The PAD can be used for temporary storage, but beware! Temporary really means temporary. A few words at the most, provided you don't generate any output or do any parsing.

Think of both these areas as predefined strings. You can refer to them as 'TIB' and 'PAD'. You don't have to declare them in any way. This program is perfectly alright:

         " Hello world" pad copy         \ store a string in pad
         count type cr                   \ print contents of the pad

If you want to know how big TIB and PAD are, you can use the predefined constants '/TIB' and '/PAD':

         ." Size of TIB: " /TIB . cr     \ print sizeof TIB
         ." Size of PAD: " /PAD . cr     \ print sizeof PAD

Note, this does not print the length of a string stored in the area, but the maximum size of the string that can be stored there.