PAGE2GO2 HOME | INTERNET NEWS

LeighExchange - Free Advertising Network Stock Research at Internet Speed Need Money Easy and Quick?

Re: Tricky macro manipulation

 List
Subject: Re: Tricky macro manipulation
Poster: AdrianHawrylukadrian.hawryluk-at-gmail.com@nospam.com
Date: Fri, 23 Mar 2007 22:01:53 GMT
Related Postings: 1 2 3 4 5
Fei Liu wrote:
> Adrian Hawryluk wrote:
>> Does anyone know of a way to manipulate a macro list to remove either
>> the beginning or the end element? I.e. Given:
>>
>> #define ELEMENTS EL(1) EL(2) EL(3)
>>
>> Is there any manipulation to get just EL(1) EL(2) out of ELEMENTS?
>>
>> Thanks for your help.
>>
>>
>> Adrian
> The real question is why you need do something like that? How about:
>
> #define ELEMENTS EL(1) EL(2) EL(3)
> #define FIRST_2_ELEMENTS EL(1) EL(2)

The reason is for writing recursively defined template code. mlimber gave me what I needed. The boost preprocessor library was something that I was going to have to (in some capacity) implement if I didn't know about it. Though I was /almost/ ok without it, this will simplify things considerably.

Thanks all,

Adrian -- _____________________________________________________________________ \/Adrian_Hawryluk BSc. - Specialties: UML, OOPD, Real-Time Systems\/ \ _---_ Q. What are you doing here? _---_ / \ / | A. Just surf'n the net, teaching and | \ / \__/___\___ learning, learning and teaching. You?_____/___\__/ \/______[blog:__http://adrians-musings.blogspot.com/]______\/

 

Page2Go2.com is not responsible for content of this message.