[My Variables]

Hi

I have doubt what is the use of the files that have variables inside of [], like [UC_KEYBOARD_t]. And how this variables works.

Thanks

Usually something like UC_KEYBOARD_t is a typedef. That is what the _t at the end usually means. However it would not makes sense to have a variable var1[UC_KEYBOARD_t].

Most likely UC_KEYBOARD_t is one of a number of defines, eg:

#define UC_KEYBOARD_t 1
#define UC_MOUSE_t 2

In this case, the pre-processor substitutes so you end up with var1[1].

Of course, without the source code there is no way for me to know this for sure. It could also be a variable inside the brackets, ie:

char var1[100];
int UC_KEYBOARD_t;

for (UC_KEYBOARD_t=0;UC_KEYBOARD_t < 100; UC_KEYBOARD_t++)
{
var1[UC_KEYBOARD_t] = 0
}

hi maschoen,

Thanks for the answer.

I ask about [UC_KEYBOARD_t] because I want to do a program tha displays all the suported keyboards. When i look at the uc_keyboard_t file, it contains all the supported keyboards, and with that somehow use this [UC_KEYBOARD_t] to display all the keyboards.

Thanks