array.Dimensions
BlitzMax Forums/BlitzMax Beginners Area/array.Dimensions
| ||
Local text$[]=["abc","def","ghi","jkl","mno","pqr","stu","vwx","yz!!!!"] Local count:Int=text.Dimensions() Notify count I expect 9! :) I get an error. :( How do I get 9? |
| ||
Local text$[]=["abc","def","ghi","jkl","mno","pqr","stu","vwx","yz!!!!"] Print SizeOf(text)/4 |
| ||
Local text$[]=["abc","def","ghi","jkl","mno","pqr","stu","vwx","yz!!!!"] Print text.length |
| ||
or Framework BRL.Blitz Import BRL.System Local text$[]=["abc","def","ghi","jkl","mno","pqr","stu","vwx","yz!!!!"] Local count:Int=text.Dimensions()[0] Notify count dimensions() returns an array. didnt know about length. see it in the docs now though clear down at the bottom :) |
| ||
Length? Oh yeah, there it is! Blimey, len(text) works as well as documented |
| ||
ok, tnx, SizeOf/4 it'll be. :D |
| ||
or text.numberOfDimensions() see http://www.blitzwiki.org/index.php/Arrays *EDIT* ignore that, I was at work and not really reading things. Now I'm at home and not really reading things, but I did re-read this. |