Action
Indicates that the
variable can be referenced with another name.
Syntax
newvar ALIAS oldvar
Remarks
oldvar Name of the variable
such as P1.1
newvar New name of the variable such as direction
Aliasing port pins can give the pin names a more meaningful name.
You can also ALIAS a variable: M ALIAS var.0 for example.
See also
CONST
Example
direction ALIAS P1.1 'now you
can refer to P1.1 with the variable direction
SET direction 'has the same effect as SET P1.1
Dim
A As Byte
M Alias A.0
N Alias A.1
Set M
Set N
If M = N Then
Print "Both bits are set"
End if
END
|