- XLogo
| Primitive | Alt | Action |
|---|---|---|
|
GlobalMake
"var xx
Local "var LocalMake "var :xx Thing "var |
Make
|
Assign variable "var value of xx. Always Global.
Create variable named "var. Unassigned. Assign variable "var value of xx, in current procedure only. Return value of variable "var. |
|
Run [
list
]
Define "name list Text "name |
Def |
Run
(execute) instructions contained in list.
Define procedure "name with each line as a list item. Return defined procedure "name as a text list. |
|
List
aa bb
Sentence aa bb Word aa bb |
Se |
Return a list composed of aa and bb.
Return a sentence composed of aa and bb. Return a word composed of aa and bb. |
| Bye | Quit XLogo. |
Note
Conditionals
| Primitive | Action |
|---|---|
|
If
cond [list]
If cond [list1] [list2] IfElse cond :a :b |
If
condition is true, then do instructions in list.
If condition is true, then do instructions in list1, else do list2. If condition is true, then do :a, else do :b. |
Editing
| Primitive | Alt | Action |
|---|---|---|
|
Edit
"name or List
EditAll To "name |
Ed
EdAll |
Edit procedure called "name or procedure names in list.
Edit all procedures. Edit or create a procedure called "name. |
A new procedure can be written by typing 'To ProcedureName ' in the command line. It will overwrite any previous procedures of the same name when you close the Editor window.
Erasing
| Primitive | Alt | Action |
|---|---|---|
|
EraseAll
EraseProcedure "Name ErasePropertyList "Name EraseTurtle xx EraseVariable "Name |
ErAll
ErP ErPL ErT ErV |
Delete all variables procedures and property lists.
Delete procedure called "name. Delete property list called "name. Delete turtle number xx. Delete variable called "name. |
eg. to delete all variables type in ErV Variables .