SHARED Array values with SUBs and FUNCTIONs
#2
(06-22-2023, 02:39 AM)DonaldĀ Foster.. Wrote: Hello All,

I usually use GOSUB for all my subroutines mainly because I'm comfortable with them and know how to use them. But there are times when I must be careful not to use the same variable names for loops when I inside a loop with the same name. For this reason, it seems SUBs and FUNCTIONs would help to prevent this problem. However, I don't know how to access ARRAYs created in the main code and SHARE it with SUBs and FUNCTIONs. I can find no examples in the WIKI.

Donald
Go to TerryRitchie's Tutorial - Chapter 6. He gives examples and explain how GOSUBS and FUNCTIONS works. I went to the wiki today to find out about FUNCTIONS and I needed more than it provided. TerryRitchie helped out on that with his Tutorial. That's what I found out today. I hope this helps you out.
Reply


Messages In This Thread
RE: SHARED Array values with SUBs and FUNCTIONs - by GareBear - 06-22-2023, 03:48 AM



Users browsing this thread: 2 Guest(s)