Lists in Transcript

Mark Wieder mwieder at ahsoftware.net
Mon May 23 22:04:31 EDT 2005


Andre-

Monday, May 23, 2005, 2:45:06 PM, you wrote:

AG> I have a silly function here that uses a paramcount() loop and put the
AG> param()s into a CR delim list. this function is called list(), when I
AG> need to pass a list to a function, I make that function work with a
AG> param pList that will be a cr delim chunk and call it by nesting 
AG> functions like this example, it's a silly func, but I like it (put this
AG> inside a button):

AG> on mouseUp
AG>    demolist "Item:", list("a", "b", "c", "d", "e")
AG> end mouseUp

AG> function list
AG>    local tList
AG>    repeat with x = 1 to paramcount()
AG>      put param(x) & cr after tList
AG>    end repeat
AG>    delete char -1 of tList
AG>    return tList
AG> end list

I'm astounded to find that "list" isn't a reserved word...

meanwhile, that's a very cute function. I may have to steal it (and
rename it, of course... I'm way too scared to call something list).

-- 
-Mark Wieder
 mwieder at ahsoftware.net



More information about the use-livecode mailing list