Jump to content
Sign in to follow this  
Cloud

AutoIt Question.. Its lame..

Recommended Posts

Cloud

Tried to research it but no luck..

When I use a recursion and pass a variable over, Does the variable I pass over overwrite existing one?

Example

Func blah($blahBlah) // :lmao:

if $blahBlah=0 then

return 0

else

return $blahBlah+blah($blahBlah-1)

endfunc

So when Im in the xth loop, Is $blahBlah still the same memory location as $blahBlah when it was first called or is it its own variable as Java uses (Dont know c++ sorry just java). If its the same How would I solve this problem. I need to keep track of each variable and they need to be different. Thanks, Cloud

Share this post


Link to post
Share on other sites
Valuater

it is still the same memory location if you use By-Reference

Func blah(ByRef $blahBlah)

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites
Cloud

Didn't work as I wanted. Thats not the program Im making but Thats where Its coming from. So how would I Make each variable point to a different location? Array with a counter in the loop?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×