Lists in Transcript

Robert Brenstein rjb at robelko.com
Mon May 23 18:38:07 EDT 2005


>Sending of many parameters is not equivalent
>
>Because if you have list
>    
>     v = [v1, v2, ... ]
>
>This is an object, like array you have.
>You can use it many times, you can modify it and so on.
>

Ruslan, I don't know much Lingo but I think any variable in 
Transcript can be used as a list similar function-wise to linear 
lists in Lingo. There is just not explicit notation for it. In a way, 
Transcript vars are more flexible as any variable can hold either a 
single value or a list and we can define the list delimiter character.

Lingo

v = [3, 4, 1] --> 3, 4, 1
v.add(2) --> 3, 4, 1, 2
put (v.count) --> 4
getPos(v,4) --> 2
v.sort --> 1, 2, 3, 4

Transcript

put "3, 4, 1" into v --> 3, 4, 1
put ", 2" after v  --> 3, 4, 1, 2
put the number of items of v --> 4
itemOffset(4,v) --> 2
sort items of v --> 1, 2, 3, 4

Or are you talking about something else?

Robert


More information about the use-livecode mailing list