Other actions (count, ascii, char, wait )
Help Contents
Logo and Languages
Other actions (count, ascii, char, wait )
Other actions (count, ascii, char, wait )
There are some other functions in Logo that do not fall in any of the groups so far.
In this section you will find their short decriptions.
The size of a word (or a list) in terms of number of letters (or elements) is calculated by count.
This function cannot be used with sets.
print count "book ; 4
print count [b [o o] k] ; 3
Conversion from letters to numbers and back is required when you work with the ascii representation of letters.
Conversions are handled by two function: ascii returns the ASCII code of a letter, and char returns the letter with given ASCII code.
print ascii "B ; 66
print char 65 ; A
Delays in program execution can be acomplished with wait, which expects one argument - the number of seconds to wait.
wait 10 ; will pause for 10 seconds
wait 0.5 ; will pause for half a second