What is this
Help Contents
Logo and Languages
What is this
What is this
number?, word?, list?, set? To write a program that proceses statements you often need to check the type of values hidden in different variables.
You can ask Logo to do this by executing the following actions: number?, word?, list? and set? which return either true (if the type of their argument matches their names) or false.
print number? 5 ; true
print word? "K12 ; true
print list? "mice ; false
print list? [m i c e] ; true
print set? [c a t s] ; false
It is a good practice when you create your own data type query fuctions, to name them after the type they check for.
And, of course, include a question mark at the end.