This file is part of the <ext/Preprocessor> library API, and can be directly included by user programs.
ext/ | This file is part of the <ext/Preprocessor> library API, and can be directly included by user programs. |
License | Copyright © 2007-2011, FreeBASIC Extended Library Development Group Copyright © 2002, Paul Mensonides |
Macros | |
fbextPP_SeqForEachI | Expands a macro for every element in a sequence. |
Copyright © 2007-2011, FreeBASIC Extended Library Development Group Copyright © 2002, Paul Mensonides
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
# define fbextPP_SeqForEachI( m, data, seq ) FBEXT_PP_REPEAT(FBEXT_PP_SEQ_SIZE(seq), fbextPP_SeqForEachI__M, (m)(data)(seq))
Expands a macro for every element in a sequence.
m | A user-defined macro that is called for every element in the sequence. It has the form m(data, i, elem), where data is auxilliary data passed to fbextPP_SeqForEachI, i is the zero-based position of the current element, and elem is the current element. |
data | Auxilliary data that is passed to the user-defined macro. |
seq | A sequence. |
User-defined.
Given a sequence (a)(b)(c)(d), this macro expands to m(data, 0, a) m(data, 1, b) m(data, 2, c) m(data, 3, d).
Expands a macro for every element in a sequence.
# define fbextPP_SeqForEachI( m, data, seq ) FBEXT_PP_REPEAT(FBEXT_PP_SEQ_SIZE(seq), fbextPP_SeqForEachI__M, (m)(data)(seq))