SHARED Array values with SUBs and FUNCTIONs
#7
Quote:@bplus - "ReDim" is useless here, since it has not yet been initialized. - The output is interesting. I know how that happens, but was that intentional? I don't really understand what you're trying to show.  [Image: huh.png]


KP,

I was just trying to show an example of a function using a shared array of first 10 squares with 5 added to each square for a non trivial though totally made up example.

ReDim was not needed in this example, no, but who gives a flying fur ball?! ReDim is good habit to use for output arrays from Subs and Functions so they can change the dimensions if that is their function or routine to do. Why restrict to Static arrays when Dynamic ones are so much more flexible with upper and lower bounds?
b = b + ...
Reply


Messages In This Thread
RE: SHARED Array values with SUBs and FUNCTIONs - by bplus - 06-22-2023, 04:05 PM



Users browsing this thread: 6 Guest(s)