const pointers in hitech C
How do I do this in Hitech C
I'm trying to pass a const pointer to a long, to allow a sub-procedure
access to a local variable of its caller without the overhead of
passing the pointer (I would hope the compiler would notice the
pointer is constant and so not create code to pass it):
I tried this....
void proc1(const long *var)
Looking at the code generated, proc1 is incrementing the pointer, not
the contents of count - I probably heva the syntax wrong - what is
the correct C syntax for the above ? Can what I'm trying to do actually be done ?
I know I could use a global, but that wastes RAM, as locals are
http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
See also: www.piclist.com/techref/microchip/languages.htm?key=c
You must be a member of the
piclist mailing list
(not only a www.piclist.com member) to post to the