Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
getting the number of dimensions in an array on the fly?
#5
(09-15-2025, 11:28 PM)madscijr Wrote: 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!
You're welcome. I've loaned my brain out lots of times. How do you think zombie movies originated?

Pete Big Grin
Reply


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

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

Forum Jump:


Users browsing this thread: 1 Guest(s)