A List of a String Array?
Monkey Forums/Monkey Programming/A List of a String Array?
| ||
For some reason I can't get this working. Basically I need a List or Stack of a String Array.Local str_array:String[2] = ["hello", "goodbye"] Local list:List = new List list.AddLast(str_array) I think I need a nap... |
| ||
A few approaches...Function Main() 'List of String arrays... Local list:=New List<String[]> list.AddLast( ["Yes","No"] ) list.AddLast( ["Ok","Cancel"] ) For Local i:=Eachin list For Local j:=Eachin i Print j Next Next 'Stack of StringStacks... Local stack:=New Stack<StringStack> stack.Push New StringStack stack.Top().Push "Yes" stack.Top().Push "No" stack.Push New StringStack stack.Top().Push "Ok" stack.Top().Push "Cancel" For Local i:=Eachin stack For Local j:=Eachin i Print j Next Next End |
| ||
Much appreciated. The first one is what I was trying to do. I had a space in between the String and []. Thanks again. |