Download eV+ Language Reference Guide, v2.0.x
Transcript
LAST real-valued function LAST real-valued function Syntax LAST (array_name[]) Function Return the highest index used for an array (dimension). Usage Considerations If an automatic variable is referenced (see the AUTO instruction), this function returns the index specified in the AUTO statement that declared this array, regardless of which elements have been assigned values. Parameter array_name[] Name of the array to be tested. Any type of eV+ array variable can be specified: real-value, location, string, or belt. At least one array index must be omitted (see below). Details This function can be used to determine which elements of an array have already been defined. For one-dimension arrays (for example, part[ ]), this function returns the largest array index for which an element is defined. (See the first example below.) For multiple-dimension arrays (for example, $names[,]), this function returns the largest array index for which an element is defined for the (left-most) dimension that is omitted from the array specification. (See the second example below.) There cannot be an index specified to the right of an omitted index. Note that the value returned by this function is an index, not an array element. Furthermore, the value is not a count of the array elements that are defined-it is the largest index for which an array element is defined. The value -1 is returned if the array does not have any elements defined for the requested dimension. That is, -1 is returned if any of the following situations occur: l The array does not exist. l The array has more or fewer dimensions than the number indicated in the function call. (For example, LAST(a[ ]) will return -1 if the array a has two dimensions.) l The specified dimension in a multiple-dimension array has not been defined at all. (For example, LAST(a[20,]) returns -1 if LAST(a[,]) returns 19. That is, no elements a [20,i] exist.) eV+Language Reference Guide, v2.0.x Updated: 5/8/2013 Page 313
Related documents
V+ Language User`s Guide, Ver. 13.0
V+ Language User`s Guide Version 11.0
V+ Language User`s Guide, Ver. 12.1
V+ Version 11.4 Release Notes
V+ Language User's Guide
Technical Reference Guide
Adept SetNetGo Software Quick Start Guide
Volume 7, Issue 1 - Verification Academy
VERT Workbook
TPS2475XEVM-546 EVM
GeoSnap Express (Tetracam) User Guide
adept technology Adept XSYS User`s guide
Vax V-006U User`s guide
User Manual
V+ Operating System User`s Guide