If i need to declare several groups of some similar looking variables, e. g.
int usepointclr_1 =0;
string cdname_1 = “cd_param_1”;
int usepointclr_2 =0;
string cdname_2 = “cd_param_2”;
i can do the following :
#define EXAMPLE(postfix, cd_param) \
int usepointclr##postfix =0; \
string cdname##postfix= cd_param;
and then use my EXAMPLE macros to declare variables
EXAMPLE(_1, cd_param_1)
EXAMPLE(_2, cd_param_2)
And now the question is:
ARE there ways to do the same stuff with #pragma's ? E. g. if i have
#pragma label “Use Point Color 1” usepointclr_1
#pragma label “Use Point Color 2” usepointclr_2
#pragma label “Use Point Color 3” usepointclr_3 e.t.c.
how should i automate typing #pragma's instructions using macroses ? (if it is possible)
macroses in VEX
3146 3 0- morzh
- Member
- 66 posts
- Joined: 10月 2008
- Offline
- Mario Marengo
- Member
- 941 posts
- Joined: 7月 2005
- Offline
- morzh
- Member
- 66 posts
- Joined: 10月 2008
- Offline
- Mario Marengo
- Member
- 941 posts
- Joined: 7月 2005
- Offline
-
- Quick Links