The Public keyword is used to declare a function globally in a unit. This is useful if the function should not be accessible from the unit file (i.e. another unit/program using the unit doesn’t see the function), but must be accessible from the object file. As an example:
If another program or unit uses this unit, it will not be able to use the function Second, since it isn’t declared in the interface part. However, it will be possible to access the function Second at the assembly-language level, by using its mangled name (see the Programmer’s Guide).
The public modifier can also be followed by a name directive to specify the assembler name, as follows:
The assembler symbol as specified by the ’public name’ directive will be ’second’, in all lowercase letters.