User Guide definitions combine to produce a splitting headache

Jim Ault JimAultWins at yahoo.com
Tue Sep 23 00:43:00 EDT 2008


I guess I have always thought of it as......

Split a text block into compartments of keys and values (an array)

Combine all the compartments of an array into one text block, and now you
can use Rev chunking commands such as

word 2 of line 5 of textBlockLines
put the number of lines in textBlockLines
replace comma with ";" in textBlockLines
put textBlockLines into field "display array"
(      you can't put an array into a field )

--removing text 
filter textBlockLines without "*junk*"
put textBlockLines into cleanArray
split cleanArray using cr and tab

--debugging you could do
get cleanArray
combine it using cr and tab
put it into msg

-- custom properties
get the customproperties of this stack
--it is now an array
combine it using cr and tab
put it into msg
--now you can see all the keys and values that are stored

It can be confusing until you start working with the Rev version of arrays.
As many have said before, knowing how arrays work in other programs does not
give you a clear idea for Transcript.

Jim Ault
Las Vegas


On 9/22/08 6:26 PM, "Joe Lewis Wilkins" <pepetoo at cox.net> wrote:

> No Doubt you're right, Jim; but sure not very intuitively worded.
> Seems like it should be the way the Guide now says it is. I guess it
> depends on what you think the words split and combine imply.
> 
> Joe Wilkins
> 
> On Sep 22, 2008, at 5:25 PM, Jim Ault wrote:
> 
>>> The definitions are reversed, right?
>> Yes,
>> the split command creates the array and
>> the combine command converts an array to text
>> 
>> put "vanilla' & tab & "ice cream" into banana
>> put "chocolate" & tab & "ice cream" into line 2 of banana
>> put "dairy" & tab & "whipped cream" into line 3 of banana
>> put "strawberry" & tab & "ice cream" into line 4 of banana
>> put "fudge" & tab & "topping" into line 4 of banana
>> put "cherry" & tab & "on top" into line 4 of banana
>> split banana using cr and tab -- yields and array with the keys of
>> 
>> vanilla
>> chocolate
>> dairy
>> strawberry
>> fudge
>> cherry
>> 
>> so that   banana["cherry"] is "on top"
>> 
>> Jim Ault
>> Las Vegas
> 
> 
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution





More information about the use-livecode mailing list