I've written a lot of code in QuickBasic 4.5 and have finally decided to learn Visual Basic. I'm using VB 4.0 which I bought a long time ago, but for learning purposes I figure it's good enough for now. It all looks pretty straightforward, but my problem comes when passing arrays as arrguments between subprocedures. An array declared dynamically as, say, "Dim arrayName() As Single" and listed in the sub's parameter list as "arrayName()" seems perfectly acceptable to VB's grammar checker, but when I try to call the sub using "arrayName()" as an argument I get a "type mis-match: array or user-defined type expected" warning. In my experience, using the array's name followed by empty parentheses has always worked for passing arrays between subs. As VB seems to accept most of QBASIC's syntax, I'm puzzled by this problem, especially since passing arrays between subs seem so fundamental. Does anyone have an answer? Thanks very much in advance.
Chas Griff 0 Newbie Poster
Paladine 138 Master Poster Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.