zasxes Posted June 4, 2004 Share Posted June 4, 2004 how do I know the last data point in an array Link to comment Share on other sites More sharing options...
Developers Jos Posted June 4, 2004 Developers Share Posted June 4, 2004 how do I know the last data point in an arrayUBound ( Array [, Dimension] ) SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
pekster Posted June 4, 2004 Share Posted June 4, 2004 The UBound function tells you how many elements there are in an array. As you listed in the topic, $array[$array[0]] works only if the first element of the array contains the number of elements (like you would get from the StringSplit function.) To get the last array element in any array, use: $array[uBound($array) - 1] [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now