View unanswered posts | View active topics It is currently Thu Oct 08, 2015 7:37 pm

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

Joined: Tue Feb 28, 2012 3:10 pm
Posts: 197
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
#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;

This would open many possibilities :)

Mike aka Spiked3

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

Who is online

Users browsing this forum: No registered users and 2 guests

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:  

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