home *** CD-ROM | disk | FTP | other *** search
- ********************
-
- FUNCTION Long_numb
-
- PARAMETERS _array, _oldest
-
- PRIVATE _theret, _element, _downtoit
-
- IF PCOUNT() = 0
- RETURN(-1)
- ELSEIF PCOUNT() = 1
- _oldest = .T.
- ELSEIF TYPE("_array") != "A"
- RETURN(-1)
- ENDIF
-
- _theret = 0
-
- IF _oldest
- _element = 0
- ELSE
- _element = 999999999999999999
- ENDIF
-
- FOR _downtoit = 1 TO LEN(_array)
- d_type = _array[_downtoit]
- IF TYPE("d_type") = "N"
- IF _oldest
- IF d_type > _element
- _element = d_type
- _theret = _downtoit
- ENDIF
- ELSE
- IF d_type <= _element
- _element = d_type
- _theret = _downtoit
- ENDIF
- ENDIF
- ENDIF
- NEXT
- RETURN(_theret)
-
- * End of File