Yes, XLogo can read its input from a dialog box! You can use the read command to do this. Try the following on the command bar:
This opens up a dialog box with Input a value as its title. It has a text box to accept input, and a button labeled OK. Whatever value you input in the text box becomes the content of variable var.
Note that you need to use the double quote symbol ". This is because you are specifying the name of the variable. In other words, "var refers to the name of a variable, :var, on the other hand, refers to the content of the variable. var refers to the keyword var.
If you don’t believe it, and you should not, use the following command to confirm the value of variable var:
You do need to use the colon to refer to the value of the variable. If you use "var, then the command just prints the word var. If you use var, then the command doesn’t know what to with it!
The print command prints its contents in the output area of the main screen. This area can scroll so that older outputs are logged so it can be reviewed later.