SHARED Array values with SUBs and FUNCTIONs - Printable Version +- QB64 Phoenix Edition (https://staging.qb64phoenix.com) +-- Forum: Chatting and Socializing (https://staging.qb64phoenix.com/forumdisplay.php?fid=11) +--- Forum: General Discussion (https://staging.qb64phoenix.com/forumdisplay.php?fid=2) +--- Thread: SHARED Array values with SUBs and FUNCTIONs (/showthread.php?tid=1770) Pages:
1
2
|
RE: SHARED Array values with SUBs and FUNCTIONs - bplus - 06-22-2023 KP "No!" no my code runs fine! Why are you changing the ReDim's to 2 for lower bound? My code ran fine here is indy test of it to show the final values as correct: Code: (Select All)
RE: SHARED Array values with SUBs and FUNCTIONs - mnrvovrfc - 06-22-2023 Things should be done like Jack's example if the subprogram has to handle arrays like that. Cannot assume 0 or 1 or any other value as the lowest subscript, just like trying to decide the upper subscript for a given program using the same subprogram. There are too many programs I've seen that assume only zeroth subscript, to then use REDIM _PRESERVE on it, but even so, a subprogram should always consult with LBOUND() and UBOUND() for the limits. |