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 le (i.e. another unit/program using the unit doesn't see the function), but must be accessible from the object le. as an example:
Unit someunit;
interface Function First : Real; Implementation Function First : Real; begin First := 0; end; Function Second : Real; [Public]; begin Second := 1; end; end. |
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 it's mangled name (see the Programmers guide).