#define xyz
static xyz myObject *__my_getitem (myObject* a, myObject *b) {
myObject *r;
.........
........
return r;
}
- What is
static? - What is
xyzdoing withstatic - Why is there a
*in front of__my_getitem - What is the difference betweern
myObject* aandmyObject *a(position of*)
It means different things in different contexts; you’ll need to read your book to understand all of its meanings. In this case, it means that the function is only available inside this source file, and not in any that are compiled separately and then linked to it.
Causing confusion. It’s an empty macro (defined in the first line) so, before compiling the program, the preprocessor will replace it with nothing.
*after a type changes the type to a pointer; so this means that the function returns a pointer to amyObject. (By the way, you should never declare a name with two consecutive_characters; names like that are reserved.)Nothing at all; whitespace never changes the meaning of the program, except where it is needed to separate tokens. Some people fight holy wars over the semantic implications of those two styles, but the language doesn’t care.