<< Click to Display Table of Contents >> Navigation: ThinBASIC Core Language > BuiltIn Functions > General functions > Alias |
Description
Add an alias to a standard keyword.
Syntax
ALIAS ExistingKeywordName AS NewNonExistentKeywordName
n = ALIAS ExistingKeywordName AS NewNonExistentKeywordName
Returns
Number
Parameters
Name |
Type |
Optional |
Meaning |
ExistingKeywordName |
No |
The name of an existent keyword name. Keyword can be taken from whatever module but module must already been loaded. |
|
NewNonExistentKeywordName |
No |
A new non existent token name to be assigned to an already existing keyword name |
Remarks
Starting from thinBasic version 1.4.0.1 ALIAS command is executed in pre-parsing phase and not during script runtime. This adds extreme power because now all thinBasic keywords can be aliases.
Restrictions
See also
Examples
USES "Console"
ALIAS Console_WriteLine AS CON_WL
ALIAS Console_WriteLine AS CWL
'---From now on you can use Console_WriteLine or CON_WL or CWL
Console_WriteLine("This is a test")
CON_WL("This is a test")
CWL("This is a test")