Difference between revisions of "AMAX()"

From Recital Documentation Wiki
Jump to: navigation, search
 
Line 1: Line 1:
 
==Class==
 
==Class==
Objects
+
Array Processing
  
  
 
==Purpose==
 
==Purpose==
Function to load the properties of an object into an array
+
Function to return the highest element value in an array
  
  
 
==Syntax==
 
==Syntax==
AMEMBERS(<array-name>,<object-ref>])
+
AMAX(<array>)
  
  
 
==See Also==
 
==See Also==
[[ACLASS()]], [[ADDPROPERTY()]], [[CLASS]], [[COMPOBJ()]], [[CREATEOBJECT()]], [[DEFINE CLASS]], [[DODEFAULT()]], [[METHOD]], [[NEWOBJECT()]], [[REMOVEPROPERTY()]], [[SET CLASSLIBRARY]], [[WITH]]
+
[[AADD()]], [[AAVERAGE()]], [[ABROWSE()]], [[ACHOICE()]], [[ACOL()]], [[ACOPY()]], [[ADEL()]], [[ADESC()]], [[ADIR()]], [[AELEMENT()]], [[AFIELDS()]], [[AFILL()]], [[AINS()]], [[ALEN()]], [[AMIN()]], [[APPEND FROM ARRAY]], [[AROW()]], [[ASCAN()]], [[ASIZE()]], [[ASORT()]], [[ASTORE()]], [[ASTRING()]], [[ASUBSCRIPT()]], [[ASUM()]], [[COPY TO ARRAY]], [[DECLARE]], [[DIMENSION]], [[GATHER]], [[LOCAL]], [[PRIVATE]], [[PUBLIC]], [[RELEASE]], [[RESTORE]], [[SAVE]], [[SCATTER]]
  
  
 
==Description==
 
==Description==
The AMEMBERS() function is used to load the names of the properties of the specified object into an array and return the number of properties loaded (and hence the number of array elements).
+
The AMAX() function evaluates all the numeric elements in the specified <array> and returns the highest value.
 
+
The <array-name> array will be created if it does not already exist.
+
 
+
  
  
 
==Example==
 
==Example==
 
<code lang="recital">
 
<code lang="recital">
class myclass
+
use payroll
property last_name
+
declare number[reccount(),1]
property first_name
+
copy to array number fields total
property email
+
? amax(number)
endclass
+
  8165.19
 
+
omyclass = new myclass()
+
dialog box str(amembers(myarray,omyclass))  && displays 3
+
display memory      && shows the array contents
+
 
</code>
 
</code>
  

Revision as of 11:01, 24 March 2009

Class

Array Processing


Purpose

Function to return the highest element value in an array


Syntax

AMAX(<array>)


See Also

AADD(), AAVERAGE(), ABROWSE(), ACHOICE(), ACOL(), ACOPY(), ADEL(), ADESC(), ADIR(), AELEMENT(), AFIELDS(), AFILL(), AINS(), ALEN(), AMIN(), APPEND FROM ARRAY, AROW(), ASCAN(), ASIZE(), ASORT(), ASTORE(), ASTRING(), ASUBSCRIPT(), ASUM(), COPY TO ARRAY, DECLARE, DIMENSION, GATHER, LOCAL, PRIVATE, PUBLIC, RELEASE, RESTORE, SAVE, SCATTER


Description

The AMAX() function evaluates all the numeric elements in the specified <array> and returns the highest value.


Example

use payroll
declare number[reccount(),1]
copy to array number fields total
? amax(number)
   8165.19


Products

Recital Database Server, Recital Mirage Server, Recital Terminal Developer