Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
getting the number of dimensions in an array on the fly?
#3
No, good sir, I think you got it. Is an array 1-dimensional, 2 or 3? 

I have a case where an array is passed in and it could be any of those.

I guess the simplest way to tell (for now) is the On Error method. 

As you say, we could reserve the first element of the first dimension of all arrays to hold that info, although that would make more work having to modify all routines that return arrays, and also be harder to understand later on for someone else reading the code. 

Thanks for lending your brain to this!
Reply


Messages In This Thread
RE: getting the number of dimensions in an array on the fly? - by madscijr - 09-15-2025, 11:28 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  _NEWIMAGE can't accept variables as dimensions? bobalooie 23 1,005 02-18-2026, 11:16 PM
Last Post: Unseen Machine
  Maximum Number of Attachments per Thread Magdha 7 478 01-13-2026, 10:13 AM
Last Post: Magdha
  Random Number Generator pmackay 14 1,274 07-30-2025, 12:56 PM
Last Post: SMcNeill
  Illegal string-number conversion Herve 7 774 07-07-2025, 09:53 AM
Last Post: a740g
  generating a random number in the full range of that number? (Integer, Long) madscijr 2 662 05-01-2025, 09:11 PM
Last Post: madscijr

Forum Jump:


Users browsing this thread: 1 Guest(s)