Static Local varialbles

For general Flowcode discussion that does not belong in the other sections.
Post Reply
S_VE
Posts: 38
http://meble-kuchenne.info.pl
Joined: Tue Jan 26, 2021 6:10 am
Has thanked: 51 times
Been thanked: 1 time

Flowcode v9 Static Local varialbles

Post 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
S_V

mnfisher
Valued Contributor
Posts: 1628
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 142 times
Been thanked: 761 times

Re: Static Local varialbles

Post by mnfisher »

There is - but it is a little bit 'clunky'

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

Martin

S_VE
Posts: 38
Joined: Tue Jan 26, 2021 6:10 am
Has thanked: 51 times
Been thanked: 1 time

Re: Static Local varialbles

Post 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.
S_V

Post Reply