Immensee Posted January 25, 2007 Share Posted January 25, 2007 hello, im quite experienced with any programming language, but how the h*ck can i return the last array index? :"> i've tried _arraymax,min,maxindex,minindex etc. but didnt work out, it seems that my english skills are quite bad.. which command can do the trick? thnx, -me Link to comment Share on other sites More sharing options...
/dev/null Posted January 25, 2007 Share Posted January 25, 2007 hello,im quite experienced with any programming language,but how the h*ck can i return the last array index? :"> i've tried _arraymax,min,maxindex,minindex etc.but didnt work out, it seems that my english skills are quite bad..which command can do the trick?thnx,-meI don't understand what you want. Post your code and mark the area where we should help. __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
Cue Posted January 25, 2007 Share Posted January 25, 2007 In the help file u will find 'Ubound' which I guess is short for upper bound so you could just put array[ubound-1] (i think) Link to comment Share on other sites More sharing options...
Immensee Posted January 25, 2007 Author Share Posted January 25, 2007 well, i want the last index of an array, like: #Include <array.au3> Dim $MyArray[5] $MyArray[0] = 1 $MyArray[1] = 2 $MyArray[2] = 8 $MyArray[3] = "sadsad" $MyArray[4] = "213" _ArrayAdd($Myarray, "myvalue") what is in this code the last index? (6, but i want a command that gives this answer) - me Link to comment Share on other sites More sharing options...
/dev/null Posted January 25, 2007 Share Posted January 25, 2007 well, i want the last index of an array,what is in this code the last index? (6, but i want a command that gives this answer)- mesee help file: ubound() __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
Immensee Posted January 25, 2007 Author Share Posted January 25, 2007 In the help file u will find 'Ubound' which I guess is short for upper bound so you could just put array[ubound-1] (i think) No , i know what ubound is it will return the number of DIMENSIONS and not INDEX dimensions is: $array[1][2][3][4] ;Ubound = 4 like that so it doens't fix my prob.. - me Link to comment Share on other sites More sharing options...
Immensee Posted January 25, 2007 Author Share Posted January 25, 2007 Nevermind, it was UBOund!!! it says: Dimension [optional] Which dimension of a multi-dimensioned array to report the size of. Default is 1, which is the first dimension. If this parameter is 0, the number of subscripts in the array is returned. so, i need to do this UBound($Myarray, 0) thanks alot - me 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