Simple Variable Array - Solved

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
DR White
Posts: 718
Joined: Fri Aug 23, 2013 12:29 pm

Simple Variable Array - Solved

Post by DR White » Fri Aug 23, 2013 12:44 pm

I need to create 2 simple Variable arrays like:

"Names" and "Gender"

I am accustomed to using a variable array such as

Name (x)

Gender (x)

PLEASE Help!

Thanks,
Last edited by DR White on Thu Sep 19, 2013 3:01 am, edited 1 time in total.

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Simple Variable Array

Post by Klaus » Fri Aug 23, 2013 12:54 pm

Hi DR White,

1. welcome to the forum! :-)

2. not sure what you mean?
Maybe this one:
...
put "Klaus" into Name[1]
put "male (mostly)" into Gender[1]
...
Now you have the name in the FIRST key of the array Name and my gender in the first key of the array Gender.
Is that what you mean?


Best

Klaus

P.S.
Will move this posting, since this is not a FEATURE REQUEST! 8-)

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

Re: Simple Variable Array

Post by dunbarx » Fri Aug 23, 2013 2:16 pm

Hi.

Hmmm.

Or maybe you mean this:

put "Klaus" into expert[firstName]
put "wavering" into expert{joking]
put "silly" into expert[dunbarPost]

So now you have a single array named "expert", with three keys "firstName", "joking" and "dunbarPost", and with the data associated with those keys.

A little practice and you should be fine.

Craig Newman

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Simple Variable Array

Post by Klaus » Fri Aug 23, 2013 2:25 pm

Or better:
...
put "Klaus" into expert["firstName"]
put "wavering" into expert{"joking"]
put "silly" into expert["dunbarPost"]
...
8)

DR White
Posts: 718
Joined: Fri Aug 23, 2013 12:29 pm

Re: Simple Variable Array

Post by DR White » Fri Aug 23, 2013 2:39 pm

Hi DR White,

1. welcome to the forum! :-)

2. not sure what you mean?
Maybe this one:
...
put "Klaus" into Name[1]
put "male (mostly)" into Gender[1]
...
Now you have the name in the FIRST key of the array Name and my gender in the first key of the array Gender.
Is that what you mean?


Best

Klaus

P.S.
Will move this posting, since this is not a FEATURE REQUEST! 8-)[/quote]

:) :wink: That worked Perfectly

DR White
Posts: 718
Joined: Fri Aug 23, 2013 12:29 pm

Re: Simple Variable Array

Post by DR White » Fri Aug 23, 2013 2:43 pm

dunbarx wrote:Hi.

Hmmm.

Or maybe you mean this:

put "Klaus" into expert[firstName]
put "wavering" into expert{joking]
put "silly" into expert[dunbarPost]

So now you have a single array named "expert", with three keys "firstName", "joking" and "dunbarPost", and with the data associated with those keys.

A little practice and you should be fine.

Craig Newman
:D Thank You for your Help!

Post Reply