Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Array problems in journal 1

Status
Not open for further replies.

cowski

Mechanical
Apr 23, 2000
8,175
I'm updating an old grip program I have (see thread561-52509) to a journal to add some new features. I'm having trouble passing arrays into/out of a couple of functions; I get an error message "Number of indices is less than the number of dimensions of the indexed array". A quick google search gives some info but I can't seem to get the 'suggested fix' to work.

Any ideas?

 
Replies continue below

Recommended for you

When declaring array lengths in vb always declare as required length-1. e.g., bbox(5) for a 6 element array.

Also when passing the array to a function pass it as bbox, not as bbox().

I have modified your file. You can see what I have done.

Suresh
www.technisites.com.au
 
 http://files.engineering.com/getfile.aspx?folder=02474b67-fc34-44d7-9855-944febc54fa3&file=bbox.vb
Thanks again, Suresh!

I had tried several different ways to declare the arrays, but my real problem was with how I was calling the function.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor