Am 26.04.2012 11:21 schrieb "Mark Morgan Lloyd" < markmll.fpc-pas...@telemetry.co.uk>: > > Is it possible to test for the existence of a file, directory or package at compilation time, i.e. {$if exists() or similar? > > The specific scenario I'm looking at is where I want to publish a couple of projects on Berlios, and the functionality will differ depending on whether a particular (Lazarus) package is available: as an example, character-by-character (not syntax-defined) colouring which I don't think I can do in any standard text-output controls. If at compilation time it was possible to detect that a package was available, it would then be possible to enable the code that at runtime created a graphical component from that package without any intervention on the part of the user building the app.
That's currently not possible. > I've just checked the 2.6.0 manuals: where are things like {$if declared() defined? It's in the Programmer's manual: http://www.freepascal.org/docs-html/prog/progsu112.html#x124-1250002.4.1 Regards, Sven
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal