We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I know this isn't a Keil specific question, but I know you guys are smart and that I'll just get a direct non-mocking answer.
Is it legal to take the address of a function argument?
void Bar(unsigned char *Pointer) { // Access data byte via the pointer } int Foo(unsigned char Arg) { Bar(&Foo); // <<<<<< Is this legal? }
I know you cannot take the address of a variable of type register and I think that knowledge is clouding my memory.
Just read few articles on "pass by value" & "pass by reference" to learn techniques of parameter passing.
explanation with an example www.cprogrammingexpert.com/.../pass_by_value.aspx
an detailed article courses.washington.edu/.../passby.html
function pointer is a concept that must be learnt after learning some basics, regularly used C skills.