identifying an array

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
edgore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 197
Joined: Wed Jun 14, 2006 8:40 pm

identifying an array

Post by edgore » Mon Oct 14, 2013 7:06 pm

Is there any way to determine if a variable is an other than checking to see if the keys of a variable are not empty? I couldn't think of one. One thing I have learned though is that there is usually a better way of doing *anything* than the only way that I can think of to do it.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10331
Joined: Wed May 06, 2009 2:28 pm

Re: identifying an array

Post by dunbarx » Mon Oct 14, 2013 11:05 pm

Hi.

This seems like an elegant and simple way, to check the keys. But you can always:

if yourVariable is an array then answer "Yes it is"

Craig

edgore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 197
Joined: Wed Jun 14, 2006 8:40 pm

Re: identifying an array

Post by edgore » Tue Oct 15, 2013 8:10 pm

Ah. See, I like your way better because it seems much more readable.

Post Reply