Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using arrays in a sub

Status
Not open for further replies.

shanley06

Programmer
Nov 26, 2002
101
0
0
US
i have a declared number of arrays in my main program i and i wanted to know if anyone could tell me how i can use them in a sub i have. i tried using shared and it doesn't work. thanks
 
I don't see why it isn't, all versions of qbasic allow subs to read SHARED arrays.

DIM SHARED array1$(100)
array1$(23) = "Hello"

SUB testsub ()
PRINT array1$(23)
END SUB


it sould work, you must have just typed something else in wrong
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top