Skip to main content
Untitled Document

Aliases

Aliases

Aliases

Aliases allow a multiple identifiers (variables, named constants, sub-programs) to refer to the same object.

The format for defining an alias is:

          ALIAS identifier IS identifier2

Often it is useful to allow a variable or constant be referred to by multiple names. For example, if on a certain project pin_a1 is a red LED, you might prefer to refer to it as RED_LED. That way if, on a different project pin_a2 is the red LED, you'd need only change the alias and everything else would continue to work fine.

          ALIAS led is pin_a1