REBOL 3 Docs Guide Concepts Functions Datatypes Errors
  TOC < Back Next >   Updated: 3-Aug-2010 Edit History  

REBOL 3 Functions: alias

alias  word  name

Creates an alternate spelling for a word.


word [word!] - Word to alias

name [string!] - Name of alias

See also:

set   get  



The alias function is an advanced feature, and must be used with care. It creates a symbolic equivalence not an additional variable. Be careful not to confuse alias with setting another word to the same value.

Create an alias for a word. The alias will be identical in every respect to the aliased word, including symbol comparison and value referencing.

alias 'print "pr"
pr "testing"

You can see that they refer to the same value:

same? :print :pr

But, it goes deeper than that, because:

'print = 'pr

Special notes

  TOC < Back Next > - WIP Wiki Feedback Admin