string array to list

BlitzMax Forums/BlitzMax Programming/string array to list

slenkar(Posted 2008) [#1]
hi how would I copy an array of strings into a list of strings?

e.g.

string_array["yellow","orange","blue"]

convert into a Tlist of strings


tonyg(Posted 2008) [#2]
Do you mean ListFromArray()?
Local array:String[]=["one","two","three"]
Local list:TList=ListFromArray(array)
For Local all:String=EachIn list
	Print all
Next



slenkar(Posted 2008) [#3]
yes thanks - i couldnt find that in the manual


tonyg(Posted 2008) [#4]
This helps.


slenkar(Posted 2008) [#5]
thanks - i have another help file called blitzmax-helpfile-128.chm - I dont know where i got it from...
but it has string split and join commands that are not in the help file that you linked to.

thing is though, your help file is 900k whereas the 1.28 one is only 700k

maybe yours has more examples?


tonyg(Posted 2008) [#6]
Not sure. If you used your help-file and put 'list array' in the search function and listfromarray wasn't one of the topics returned then it might be missing a few other commands.


jsp(Posted 2008) [#7]
Could be this one and it misses the user examples.


slenkar(Posted 2008) [#8]
yeah thats the one,
originally i was using the help file from the IDE


tonyg(Posted 2008) [#9]
The search function doesn't produce the same results as the one I use.
Try downloading both and putting 'list array' in the search field.


slenkar(Posted 2008) [#10]
true, it brings up the most relevent results


Macguffin(Posted 2008) [#11]
tonyg - Thanks VERY much for posting that link.