ik wrote:
On Tue, Feb 19, 2013 at 3:31 PM, Mark Morgan Lloyd
<markmll.fpc-pas...@telemetry.co.uk> wrote:
Does a unit- rather than something it contains- have any sort of
representation which is recognisably distinct from an object?

I've got a situation where if a library (.dll or .so) is opened under
program control it is represented by an object, with entry points expressed
as methods. Alternatively, if it's statically linked then it's represented
by a unit, with entry points represented by procedures and functions. That
allows me to write things like

caps := LibCapShim.cap_get_proc;  // LibCapShim is object or unit

It's a namespace. It can be a namespace of a unit, record, instance of
class or object.

Which I presume is a concept valid only within the compiler, and even if it were accessible in some way would be little better than a conditional directive.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to