View unanswered posts | View active topics It is currently Mon Oct 20, 2014 4:08 am






Reply to topic  [ 1 post ] 
Wish list -Token concatenation 
Author Message
Expert

Joined: Tue Feb 28, 2012 3:10 pm
Posts: 195
Post Wish list -Token concatenation
I don't know if wishes are appropriate here or not, if not - accept my apology (and let me know). But I figured this way other user could chime in.

So anyhow, in ansiC the pre-processor generally accepts tokens, and allow concatenation.
for example
Code:
#define DECLARE_STRUCT_TYPE(name) typedef struct name##_s name##_t
 
DECLARE_STRUCT_TYPE(g_object); // Outputs typedef struct g_object_s g_object_t;


(taken from wiki; http://en.wikipedia.org/wiki/C_preprocessor)

This would open many possibilities :)

_________________
Mike aka Spiked3
http://www.spiked3.com


Wed Oct 17, 2012 12:44 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.