Knowledgebase:
ArrayMaximum
Posted by Mohammad Rahhal, Last modified by Rawan Al Hourani on 13 July 2017 11:56 AM

Syntax

Public Function ArrayMaximum(ary As Variant, start As IntegerOptional Count As Integer = -1) As Integer

This function is used to get the maximum number in a numeric array from a specific given start position.

Parameters

Key Description 
ary   Array to get the max value, value of type Variant.
start Index to start checking max number, a value of type Integer.
Count Number of search elements, by default searches all array,value of type Integer.

Return value

Returns the maximum value in the selected array as Integer. In case of failure, returns -1.

Sample

 Public Sub main ()

 Dim Arr

 CopyHigh 0, 10, 20, Arr

 Dim Result

 Result = ArrayMaximum (Arr,1,-1)

 AlertMessage (Result) ‘Returns the maximum number at Arr

 End sub

See Also


Back to VTL Client Script Index

(0 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).

Help Desk Software by Hybrid Solutions