>TotalSymbols=4&
>Symbols=
>12!21!23!30!34!40!42!44!51!53~
>11!13!22!30!31!33!34!41!43!51!53!62~
>12!21!23!30!34!40!44!51!52!53~
>12!21!23!30!34!40!42!44!51!53
>
>and this is the format I want it to be in Director as an array...
>-----
>Symbols[1] = [12, 21, 23, 30, 34, 40, 42, 44, 51, 53]
>Symbols[2] = [11, 13, 22, 30, 31, 33, 34, 41, 43, 51, 53, 62]
>Symbols[3] = [12, 21, 23, 30, 34, 40, 44, 51, 52, 53]
>Symbols[4] = [30, 40, 21, 51, 12, 42, 23, 53, 34, 44]


There are different approaches to do this. Assuming your "12!34!56" 
numbers come as a string:

Symbols = 
makearray("12!21!23!30!34!40!42!44!51!53~11!13!22!30!31!33!34!41!43!51!53!62~12!21!23!30!34!40!44!51!52!53~12!21!23!30!34!40!42!44!51!53")

put Symbols[1]
-- [12, 21, 23, 30, 34, 40, 42, 44, 51, 53]
put Symbols[2]
-- [11, 13, 22, 30, 31, 33, 34, 41, 43, 51, 53, 62]
put Symbols[3]
-- [12, 21, 23, 30, 34, 40, 44, 51, 52, 53]
put Symbols[4]
-- [12, 21, 23, 30, 34, 40, 42, 44, 51, 53]


where 'makearray' is this short function:

on makearray thetext
   repeat while thetext contains "!"
     c = offset("!",thetext)
     put "," into char c of thetext
   end repeat
   repeat while thetext contains "~"
     c = offset("~",thetext)
     put "],[" into char c of thetext
   end repeat
   return value("[["&thetext&"]]")
end

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to