tom12sg
Member level 2
Hi,
I used to code in assemble and normally I will use
#define newname oldname
to reuse the same global variable in another module. Thus saving ram usage.
How can I do that in C language for global variable or structure. Cos after my program exit from a state, the values in structure and variables are no longer required. I know of using union, is that the only way out?
Please advice by giving simple example to illustrate if there is better way. By the way I'm using Keil complier, which follow ANSI standard.
Thanks for the help.
I used to code in assemble and normally I will use
#define newname oldname
to reuse the same global variable in another module. Thus saving ram usage.
How can I do that in C language for global variable or structure. Cos after my program exit from a state, the values in structure and variables are no longer required. I know of using union, is that the only way out?
Please advice by giving simple example to illustrate if there is better way. By the way I'm using Keil complier, which follow ANSI standard.
Thanks for the help.