About arrays

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Pascal
Posts: 19
Joined: Sat Jul 10, 2010 2:06 pm
Contact:

About arrays

Post by Pascal » Fri Jul 23, 2010 11:29 am

Hello,

Two questions about arrays :
  • - are arrays global variable ?
    - do we have do declare arrays before using them, or are they created on the fly, in the script ?
Thanks
Pascal (French, sorry for the way I write)
RevEnterprise 4.5.0 dp3 OSX 10.4.11

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Re: About arrays

Post by bn » Fri Jul 23, 2010 10:48 pm

Hi Pascal
Arrays are Not globals, but you can Set a global to Be an array.

You don't have to declare an Array.
If you write
Put anyValue into myArray[1]
You create the array on the fly. Your Key 1 of your array myArray will contain anyValue
Regards
Bernd

Pascal
Posts: 19
Joined: Sat Jul 10, 2010 2:06 pm
Contact:

Re: About arrays

Post by Pascal » Sat Jul 24, 2010 7:47 am

Thanks.
Pascal (French, sorry for the way I write)
RevEnterprise 4.5.0 dp3 OSX 10.4.11

Post Reply