ALIAS

Top  Previous  Next

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