Function Alias() Foundation
Returns the alias name for a work area.
Alias( [<nWorkArea>] ) --> cAlias
The return value of Alias() is a character string containing the alias name of the work area. If no argument is passed to the function, the function returns the alias name of the current work area. If no file is open in the work area, a null string ("") is returned.
The function Alias() determines the alias name of a work area. The alias name of a work area is defined when the database file is opened by the command USE or the function DbUseArea(). The counterpart of Alias() is the function Select(), which provides the work area number based on the alias name passed. Index files have the analogous function pair OrdName() and OrdNumber().
// The example demonstrates the return values of the function Alias().
PROCEDURE Main
? Alias() // result: (null string (""))
? Select( Alias() ) // result: 0
USE Customer NEW
USE Invoice ALIAS Inv NEW
? Alias() // result: INV
? Select() // result: 2
? Alias(1) // result: CUSTOMER
? Alias(2) // result: INV
? Alias(3) // result: (null string (""))
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.