What is make a local copy of the value used for?

For general Flowcode discussion that does not belong in the other sections.
Post Reply
Amtor
Posts: 47
http://meble-kuchenne.info.pl
Joined: Thu Dec 17, 2020 4:35 pm
Has thanked: 17 times
Been thanked: 14 times

What is make a local copy of the value used for?

Post by Amtor »

Hello,
What is make a local copy of the value used for.
A value still gets passed into the marco being called and appears as a local value even if the box is not checked.
I may be going senile.
Thanks.
Mark
local copy.JPG
local copy.JPG (33.89 KiB) Viewed 771 times

mnfisher
Valued Contributor
Posts: 938
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 104 times
Been thanked: 502 times

Re: What is make a local copy of the value used for?

Post by mnfisher »

Strings can be passed by reference or value - reference just passes the address and any changes made are passed back.

Make a local copy does exactly that (so passed by value)- so any changes are kept local to the macro.

Note that the box is 'checked' but not selectable for arrays but these are all passed by reference.

Making a local copy is slower and should probably be avoided in most cases.

Martin

Amtor
Posts: 47
Joined: Thu Dec 17, 2020 4:35 pm
Has thanked: 17 times
Been thanked: 14 times

Re: What is make a local copy of the value used for?

Post by Amtor »

Thanks very much.
I seem to remember something not quite working as I expected once, when I had that box checked but can't remember what now.

Anyway I'll leave it un-checked it's too advanced for me.

Good luck
Mark

Post Reply