next up previous contents index
Next: Arithmetical and logical operations Up: Movement of the turtle; Previous: Animation Mode   Contents   Index

Writing in the text area with the primitive print or write

This table sets out the primitives which allow the properties of the text area to be adjusted. Those primitive that control the color and the size of the history area, are available only for the primitives print or write

Primitives Arguments Utilisation
Primitives Arguments Utilisation
ct, cleartext none Empties the area containing the command and comment history.
pr, print word, list or number shows the argument specified in the history zone.
pr "abcd --------> abcd
pr [1 2 3 4] ----> 1 2 3 4
pr 4 ------------> 4
write word, list or number The same as for the print primitive but doesn't go back to the line.
setTS, setTextSize a: number Define the size of the font in the command history. Only valid with the primtive print
textsize, ts none Returns the size of the font with primitive print.
setTC, setTextColor a:number or list Define the color of the font in command history. Valid only with the primitive . See p.[*].
TextColor, tc none Returns the color of the font with the primitive print in the command history.
setTN, setTextName n: number Select the font number n when you write on the the command history with the primitive print. You can find the link between number and font in Menu$ \to$Options$ \to$Preferences$ \to$Tab Font.
TextName, tn none Returns a list with two elements. The first is the number corresponding to the font used when you write on the command history with the primitive print. The last element is a list which contains the name of the font.
setstyle, setsty list or word Set the format of the police in the text area. You can choose between seven styles: none, bold, italic, strike, underline, superscript, subscript. If you want several styles together, write them in a list. Look at examples after this table.
style, sty none Returns a list which contains the differents styles used for the primitive print.


A few examples for formatting text:

setstyle [bold underline] print "hello
hello
ssty "strike write [strike] ssty "italic write "\ x ssty "superscript print 2
strike $ x^2$

next up previous contents index
Next: Arithmetical and logical operations Up: Movement of the turtle; Previous: Animation Mode   Contents   Index
Loïc 2008-06-08