|
|
|
< structures |
Aliases |
locations > |
|
|
An alias is a data-type which refers to another variable for its data. To create an alias, use the alias function &, which requires a variable as an argument: a.x = 2 To retrieve the value of the aliased variable use the system property .&, e.g. a.x = 2 One use of aliases is to pass parameters to a function by reference. All parameters are passed by value, but the value passed can be an alias, e.g. a=1 There are some restrictions on using aliases, to prevent private variable aliases 'disappearing' when a child-turtle finishes.
|
|
< structures |
locations > |