Function Used() Foundation
Determines whether a file is open in a work area.
Used([<nWorkArea> | <cAlias>]) --> lIsUsed
Used() returns the value .T. (true) if a file is open in the specified work area. Otherwise it returns .F. (false).
The database function Used() determines whether a file is open in a work area. If the function is used without the alias operator, it determines whether a file is open in the current work area.
// The example demonstrates the return value of Used()
// for various work areas.
PROCEDURE Main
USE Customer NEW
? Select() // result: 1
? Used() // result: .T.
? (2)->(Used()) // result: .F.
? Select("Invoice") // result: 0
USE INVOICE NEW
? Select("Invoice") // result: 2
? (1)->(Used()) // result: .T.
? (2)->(Used()) // result: .T.
? (3)->(Used()) // result: .F.
CLOSE DATABASES
RETURN
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.