SUPPORTED USER

Troy Rollins troy at rpsystems.net
Thu Jun 17 14:54:48 EDT 2004


On Jun 17, 2004, at 2:27 PM, hershbp at verizon.net wrote:

I've seen this posted several times, and you've probably seen no 
answers because your questions are a bit "unstructured." Perhaps some 
of them should actually be separate topics.

> What is the point of an varArray[] or how do they work that a var 
> won't do ? If I need more then 1 var use 2 var's or more wouldn't do 
> it ? Or
> set itemDelimiter to tab
> get item 1 of line 1
> of  myVar if I need to explicitly create the array's and put every 
> thing separately ?

Sometimes arrays are useful this way. For instance, if you have an 
array "CurrentUser", the array may look like this inside -

CurrentUser["Name"] = "John Doe"
CurrentUser["Job"] = "Junior Programmer"
CurrentUser["Contract"] = TRUE

and so on. Then, it can be more sensible to locate the specific 
information desired, and it keeps the user's information together. 
Using "the lines" in this case would be a bit messier to deal with. In 
general, arrays are an organizational tool, and there is nothing that 
says you MUST use them. It is useful for those who come to transcript 
that are used to other languages, or those with specific data handling 
needs best met with variables that have a more rigid structure.

> Also the array's are like horizontal rows ,what's doing with rows (or 
> a 2 dimension array) ?
>
> If I use a varArray [] in a repeat e.g.
> repeat for each line myL in varArray[]
>      --could I take info from which array I want do the lines work 
> together ?
>      if "A" then put line myL of varArray[1] else put line myL of 
> varArray[2]
> end repeat--will it return item 2 of line 1 , if myL is the first line?

Have you actually tried it? What result did it give you?

--
Troy
RPSystems, Ltd.
http://www.rpsystems.net



More information about the use-livecode mailing list