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_SeqInsert | Inserts an element before a certain position 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_SeqInsert( seq, i, elem ) FBEXT_PP_CAT(FBEXT_PP_IF(i, FBEXT_PP_SEQ_FIRSTN, fbextPP_TupleEat__2)(i, seq)(elem), FBEXT_PP_SEQ_RESTN(i, seq))
Inserts an element before a certain position in a sequence.
seq | A sequence. |
i | The zero-based position in the sequence to insert the element. |
elem | The element to insert. |
The new sequence.
Given a sequence (a)(b)(c)(d) and i 2, this macro willl expand to (a)(b)(x)(c)(d).
Inserts an element before a certain position in a sequence.
# define fbextPP_SeqInsert( seq, i, elem ) FBEXT_PP_CAT(FBEXT_PP_IF(i, FBEXT_PP_SEQ_FIRSTN, fbextPP_TupleEat__2)(i, seq)(elem), FBEXT_PP_SEQ_RESTN(i, seq))