Page 1 of 1

Static Local varialbles

Posted: Sat Jun 22, 2024 11:32 am
by S_VE
Hi

is there any way to create a STATIC Local Variables within the macro?

so that the variable retains the value even after exiting the macro.

this is the same as we use in C Program.

( this is to avoid cluttering the Global Variable section )

Thanks
-S_Ve

Re: Static Local varialbles

Posted: Sat Jun 22, 2024 12:40 pm
by mnfisher
There is - but it is a little bit 'clunky'

See viewtopic.php?f=3&t=1509&hilit=static&p=8672#p8672

Martin

Re: Static Local varialbles

Posted: Sat Jun 22, 2024 4:08 pm
by S_VE
Thank you Martin

but does this method take one extra variable (data memory), and few more cycles ?

very useful workaround . Thank you.