Variables : You can create variables very easily in Logo using "make name.of.variable value.of.variable". Consider the following example:
-----------------------------------------------------------------------------
make "a1 234 ; :a1 is the number 234
make "a2 "hello ; :a2 is the word "hello
make "a3 [hello world] ; :a3 is the list [hello world]
-----------------------------------------------------------------------------
You can take the value of the variable using ":" in front of its name .
-----------------------------------------------------------------------------
:a1
:a2
:a3
-----------------------------------------------------------------------------
Examples creating variables.Welcome to Berkeley Logo version 5.5
? make "a1 "hello
? make "a2 "|hello world|
? make "a3 123
? make "a4 1.234
? make "a5 ["hello 123 1.232 ["hello "world]]
? :a1
You don't say what to do with hello
? print :a1
hello
? print :a2
hello world
? print :a3
123
? print :a4
1.234
? print :a5
"hello 123 1.232 ["hello "world]
? show :a1
hello
? show :a2
hello world
? show :a3
123
? show :a4
1.234
? show :a5
["hello 123 1.232 ["hello "world]]
?
-----------------------------------------------------------------------------
make "a1 234 ; :a1 is the number 234
make "a2 "hello ; :a2 is the word "hello
make "a3 [hello world] ; :a3 is the list [hello world]
-----------------------------------------------------------------------------
You can take the value of the variable using ":" in front of its name .
-----------------------------------------------------------------------------
:a1
:a2
:a3
-----------------------------------------------------------------------------
Examples creating variables.Welcome to Berkeley Logo version 5.5
? make "a1 "hello
? make "a2 "|hello world|
? make "a3 123
? make "a4 1.234
? make "a5 ["hello 123 1.232 ["hello "world]]
? :a1
You don't say what to do with hello
? print :a1
hello
? print :a2
hello world
? print :a3
123
? print :a4
1.234
? print :a5
"hello 123 1.232 ["hello "world]
? show :a1
hello
? show :a2
hello world
? show :a3
123
? show :a4
1.234
? show :a5
["hello 123 1.232 ["hello "world]]
?