Page 1 of 1

return the length of array

Posted: 2009-01-12 23:49:51
by iRuLez

Code: Select all

sub main()

	dim array[11]
		array[0] = 1
		array[1] = 2
		array[2] = 3
		array[3] = 4
		array[4] = 5
		array[5] = 6
		array[6] = 7
		array[7] = 8
		array[8] = 9
		array[9] = 10
		array[10] = 11

uo.print(str(len(array)))

end sub
why print 5 ??

i need of return the length of the my_array
how can to do?

Posted: 2009-01-13 00:19:51
by Millerbeer

Code: Select all

uo.print(str(len(array))) 
This command prints number of letters in a word - array :)
As I know, not possible to return the length of array