Function Alias() Foundation

Returns the alias name for a work area.

Syntax
Alias( [<nWorkArea>] ) --> cAlias
Parameters
<nWorkArea>
<nWorkArea> is a positive integer specifying the work area where the alias name is determined.
Return

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.

Description

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().

Examples
Alias()
// 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 
Feedback

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.