Click or drag to resize

Alias Function

Return the alias of a specified work area as a string.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.08
Syntax
 FUNCTION Alias(
	 nWorkArea AS USUAL
) AS STRING
View Source

Parameters

nWorkArea
Type: Usual
Any work area number.  If not specified, the alias of the current work area is returned.

Return Value

Type: String
If there is no database file in use, Alias() returns a NULL_STRING.
Remarks
Alias() is the inverse of Select(): Alias() returns the alias name given the work area number, while Select() returns the work area number given the alias name.
Examples
This example returns the name of the previously selected work area:
X#
USE file1 NEW ALIAS Test1
nOldArea := Select()
USE file2 NEW ALIAS Test2
QOut(Alias(nOldArea))                        // Returns: Test1
See Also