ext/preprocessor/control/if.bi

This file is part of the <ext/Preprocessor> library API, and can be directly included by user programs.

Summary
ext/preprocessor/control/if.biThis file is part of the <ext/Preprocessor> library API, and can be directly included by user programs.
LicenseCopyright © 2007-2011, FreeBASIC Extended Library Development Group Copyright © 2001, Housemarque Oy (http://www.housemarque.com)
Macros
fbextPP_IfExpands one of two texts depending on a numeric condition.

License

Copyright © 2007-2011, FreeBASIC Extended Library Development Group Copyright © 2001, Housemarque Oy (http://www.housemarque.com)

Distributed under the Boost Software License, Version 1.0.  See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

Distributed under the FreeBASIC Extended Library Group license.  See accompanying file LICENSE.txt or copy at http://code.google.com/p/fb-extended-lib/wiki/License

Macros

fbextPP_If

# define fbextPP_If(c,
t,
f) fbextPP_Iif(fbextPP_Bool(c), t, f)

Expands one of two texts depending on a numeric condition.

Parameters

cA number.  This number is converted to a boolean value.  If this conversion is not necessary, use fbextPP_Iif instead.
tthe text to expand if c is non-zero.
fthe text to expand if c is zero.

Returns

One of the two texts.

# define fbextPP_If(c,
t,
f) fbextPP_Iif(fbextPP_Bool(c), t, f)
Expands one of two texts depending on a numeric condition.
# define fbextPP_Iif(c,
t,
f) fbextPP_Iif__##c(t, f)
Expands one of two texts depending on a boolean condition.