16 Jun
2007
16 Jun
'07
1:49 a.m.
"Server Levent Yilmaz"
I have a related, simpler question:
Given a tuple (or any other container) with arbitrary elements, is there a way to determine if an element is SPECIAL_TEXT or some other text. For example given, ( a, b, SPECIAL_TEXT, c, d ), can we construct (0, 0, 1, 0, 0)?
If you know all the possibilities in advance, you can do something like: #define LOOKING_FOR_SPECIAL_TEXT 1 #define LOOKING_FOR_a 0 #define LOOKING_FOR_b 0 #define LOOKING_FOR_c 0 #define LOOKING_FOR_d 0 and then transform the sequence using concatination LOOKING_FOR_ with the current item. Regards, Arkadiy