[Lazarus] $IF for Linux and FreeBSD platforms?

Sven Barth pascaldragon at googlemail.com
Tue Feb 28 23:12:53 CET 2017


Am 28.02.2017 20:37 schrieb "Lars via Lazarus" <
lazarus at lists.lazarus-ide.org>:
>
> On 2017-02-16 05:35, Graeme Geldenhuys via Lazarus wrote:
>>
>> On 2017-02-16 11:18, Ondrej Pokorny via Lazarus wrote:
>>>
>>> Well, you mixed up DEFINED and DECLARED macros.
>>
>>
>
> Sorry newbie question regarding these $IF directives:
>
> can someone explain why you would use "$IF defined" instead of $IFDEF...
>
> Obviously there are likely reasons for using one over the other.

$IFDEF FOO is an abbreviation for $IF DEFINED(FOO). The latter also allows
to combine multiple checks using AND and OR (and also allowing comparisons
with constant values) while the former can always only check for a single
define.

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20170228/6e47305f/attachment.html>


More information about the Lazarus mailing list