File objects, Font objects – AMT Datasouth PAL User Manual
Page 25
Objects
19
Therefore, systemdict establishes the association between a particular name and an intrinsic op-
eration. PAL allows the programmer to supercede the associations in this dictionary. As a result,
unlike other programming languages, PAL does not really treat the default names associated with
each operation as reserved words. However, changing the definition of PAL's standard names only
serves to make the programmer's PAL code harder to understand.
3.3.2.
File Objects
The PAL language supports the concept of a data file. However, the location and naming of data
files can vary from one PAL printer to the next. Typically, files may reside either in the printer’s
flash memory or in flash provided in the optional RTC card..
A file can also represent some input/output device available on the printer. As an example, the
programmer can create a PAL program which reads data from the same host interface supplying
commands to the PAL interpreter.
In order to keep track of the various information related to accessing of files, PAL creates a file
object when the programmer opens a file. PAL then places this file object on the operand stack.
The programmer can then save this object in order to access the file at a later time. Whenever the
programmer wishes to access the file, the programmer places the file object back onto the stack
and sends PAL the operator associated with the desired file access.
The file object references data private to the PAL interpreter. The interpreter does not allow the
PAL programmer direct access to this information. However, PAL does provide operators which
allow the programmer to indirectly access some of the file object information.
3.3.3.
Font Objects
Each PAL printer contains a set of predefined fonts for drawing characters. Each font has a
dictionary which defines all of the characteristics of that font.
Normally, a PAL programmer can view this dictionary as the font itself. The PAL operators which
work with fonts accept this dictionary as an indication of which font to manipulate.
A font dictionary has the exact same structure as any other PAL dictionary. Therefore, the
programmer may freely access the entries within any font dictionary. However, only the most ex-
perienced PAL programmers should even consider altering the contents of a font dictionary.