scila1996 Posted July 21, 2014 Share Posted July 21, 2014 I have an array ranges from 0 to 10 as follows Local $a[11] = [25,13,96,16,71,3,9,2,52,30,78] How to find the largest number in sequence on the array ? I'm new to programming should expect your help !!! Thank You Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 21, 2014 Moderators Share Posted July 21, 2014 scila1996,And I expect you to look in the Help file and see if any function jumps out at you. You are looking for the maximum value in an array - have you tried examining the Array library to see if there is a likely candidate? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
mikell Posted July 21, 2014 Share Posted July 21, 2014 Melba, Formerly the help for AutoIt3 and UDFs was in 2 separate .chm files Maybe the OP still uses an old version and encounters difficulties to find 'Array Management' ? Link to comment Share on other sites More sharing options...
scila1996 Posted July 21, 2014 Author Share Posted July 21, 2014 Thank ALL ! I I have done successfully Local $a[11] = [25,13,96,16,71,3,9,2,52,30,78] Local $max_min[2]; 0 = max <> 1 = min ; $max_min[0] = $a[0] For $i = 0 To UBound($a) - 1 If $a[$i] > $max_min[0] Then $max_min[0] = $a[$i] EndIf Next MsgBox(64,"Dsds",$max_min[0]) Link to comment Share on other sites More sharing options...
mikell Posted July 21, 2014 Share Posted July 21, 2014 Do you realize that you're going to drive Melba crazy ? #include <Array.au3> Local $a[11] = [25,13,96,16,71,3,9,2,52,30,78] Msgbox(0,"", _ArrayMax($a, 1) ) Link to comment Share on other sites More sharing options...
Celtic88 Posted July 22, 2014 Share Posted July 22, 2014 Local $a[11] = [925,13,96,16,71,99993,9,2,52,30,178] $i = 0 For $ii = 1 To UBound($a) - 1 if $ii = UBound($a) - 1 then If $a[$i] < $a[$ii] Then $i = $ii ExitLoop endif If $a[$i] < $a[$ii] Then $i = $ii ContinueLoop EndIf Next MsgBox(64,"Dsds",$a[$i]) Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 22, 2014 Moderators Share Posted July 22, 2014 mikell,Not crazy, just a little sad when I think of all the time and effort that has been spent on creating that Help file which is often so sadly ignored. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
November Posted July 22, 2014 Share Posted July 22, 2014 mikell, Not crazy, just a little sad when I think of all the time and effort that has been spent on creating that Help file which is often so sadly ignored. M23 Melba23, I still use the help file until today! Almost for 8 years. That's why i try not give the fish for them, but i try to teach them how to fish! Cheers and keep the excelent job! Old Scriptology Visual Ping 1.8 - Mass Ping Program with export to txt delimited. Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code. Desktop 2 RGB - Pick a color in the desktop and get the RGB code. ShootIT 1.0 - Screen Capture full and partial screen [font="'Arial Black';"]Remember Remember The Fifth of November.[/font] Link to comment Share on other sites More sharing options...
mikell Posted July 22, 2014 Share Posted July 22, 2014 Melba, You shouldn't think of some people ignoring the helpfile, but think of these thousands of users - including myself - who consider it as a must 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