home *** CD-ROM | disk | FTP | other *** search
- ********************
-
- FUNCTION Got
-
- PARAMETERS _file, _fieldno, _record
-
- PRIVATE _inb, _giveit, _retarea, _output, _close
-
- STORE "" TO _inb, _giveit, _retarea, _output
-
- _retarea = SELECT()
- _close = .F.
-
- IF TYPE("_file") = "C"
- IF LEN(_file) = 1 .OR. ( VAL(_file) >= 1 .AND. VAL(_file) <= 200 )
- SELECT &_file.
- ELSEIF EMPTY(_file)
- * this means that the file is already
- * selected because it is being called with
- * the extended () feature or the Mpop()
- * needs to work in the current and open
- * database
- IF EMPTY(ALIAS())
- RETURN("")
- ENDIF
- ELSE
- SELECT 0
- USE (_file)
- _close = .T.
- ENDIF
- ELSEIF TYPE("_file") = "N"
- SELECT (_file)
- ELSE
- IF EMPTY(_file)
- * this means that the file is already
- * selected because it is being called with
- * the extended () feature or the Mpop()
- * needs to work in the current and open
- * database
- IF EMPTY(ALIAS())
- RETURN("")
- ENDIF
- ENDIF
- ENDIF
-
- IF _fieldno > FCOUNT() && If the field number given is larger than
- RETURN("") && the number of fields in the database, just
- ENDIF && return a null byte.
-
- IF _record = 0 .OR. LASTREC() = 0
- GO TOP
- _inb = FIELDNAME(_fieldno)
- _giveit = &_inb
- IF _close
- USE
- ENDIF
- IF !EMPTY(_file)
- SELECT (_retarea)
- ENDIF
- RETURN(MAKE_EMPTY(_giveit))
- ELSE
- GO _record
- ENDIF
- _inb = FIELDNAME(_fieldno)
- _output = &_inb.
- IF _close
- USE
- ENDIF
- IF !EMPTY(_file)
- SELECT (_retarea)
- ENDIF
- RETURN(_output)