Spis poleceń › Text — poleceń: 55


ascii

text

Wejście: character
Wyjście: number

Returns the ASCII (American Standard Code for Information Interchange) index value for the specified character.

print ascii "A
65

backspace

text

Wejście: none
Wyjście: none

Moves the cursor one space to the left and deletes its contents.

backspace

center

text

Wejście: none
Wyjście: none

Centers any text output using print.

center

char

text

Wejście: ASCII value (number)
Wyjście: character

Returns a character with the specified ASCII value.

show char 84
T

cleartext

Także: ct

text

Wejście: none
Wyjście: none

Clears the text area.

cleartext

colchar

text

Wejście: color index (number)
Wyjście: none

Inserts a 'color character' into a word, which when printed changes the foreground color of the subsequent text in the word to that color. A color character cannot be a list item unto itself (it will return an error).

print word colchar 4 "duck

cursor

text

Wejście: none
Wyjście: none

Returns the position of the text cursor.

show cursor

cursorchar

text

Wejście: none
Wyjście: character (word)

Returns the current cursor character. See setcursorchar

show cursorchar

cursordown

Także: cd

text

Wejście: none
Wyjście: none

Moves the text cursor down one.

cursordown

cursorhome

text

Wejście: none
Wyjście: none

Returns the cursor to the left side of the text area.

cursorhome

cursorleft

Także: cl

text

Wejście: none
Wyjście: none

Moves the text cursor one to the left.

cursorleft

cursorright

Także: cr

text

Wejście: none
Wyjście: none

Moves the text cursor one to the right.

cursorright

cursorup

Także: cu

text

Wejście: none
Wyjście: none

Moves the text cursor up one.

cursorup

definetextcolor

text

Wejście: index (number) | list or word
Wyjście: none

definetextcolor takes an index number from 0 to 63 and either a list of three values (representing red, green, and blue) with a value from 0 to 100, or a 6-character word representing a color's RGB values in hexadecimal format, for example ab1274

definetextcolor 20 [50 20 90]
definetextcolor 21 "ab1274

flash

text

Wejście: none
Wyjście: none

Causes subsequent text to flash. See inverse, normal.

flash

hidecursor

text

Wejście: none
Wyjście: none

Hides the text cursor.

hidecursor

inverse

text

Wejście: none
Wyjście: none

Causes subsequent text to be displayed in inverse (foreground color as background color and vice-versa).

inverse

justify

text

Wejście: none
Wyjście: word

Returns left, right, center or none, dependent on the current setting.

show justify
left

leftjustify

text

Wejście: none
Wyjście: none

Left justifies any text output using print. This is the default behavior. If you want to use multiple spaces in print output, you need to disable justify with nojustify

leftjustify

linefeed

text

Wejście: none
Wyjście: none

Moves the cursor down to the start of the following line.

linefeed

nojustify

text

Wejście: none
Wyjście: none

Disables justify (and word wrapping)

nojustify

normal

text

Wejście: none
Wyjście: none

Causes subsequent text to be displayed normally, eg without inverse or flash. See inverse, flash

normal

overlayscreen

Także: os

text

Wejście: none
Wyjście: none

Overlays the full text screen over the graphics output, basically a transparent textscreen. Not to be confused with camera overlays. See textscreen, splitscreen, fullscreen

overlayscreen

print

Także: pr

text

Wejście: input
Wyjście: none

Wypisuje na ekranie to, co otrzyma (słowo, liczbę, listę, wyrażenie). Jeśli włączone jest leftjustify, rightjustify lub center, print automatycznie zawija tekst. Gdy jednak któreś z nich jest włączone, print nie może wypisać więcej niż jednej spacji z rzędu. Aby wyłączyć zawijanie, zobacz nojustify.

print "Hello!
print |How are you?|
print [I am fine]
print 5 * 3
print myrtle:position

randomtextcolor

Także: randtc

text

Wejście: none
Wyjście: none

Sets a random text foreground non-black color

randomtextcolor

randomtextshade

Także: randts

text

Wejście: none
Wyjście: none

Sets a random text shade.

randomtextshade

readtextline

text

Wejście: line (number)
Wyjście: word

Returns the text on the given line. Note that the specified line is based on a 48 vertical line screen (counting from 0), so in 24 line mode (for example) you need to multiply the required line by 2.

show readtextline 0

readtextpos

text

Wejście: [x y] (list)
Wyjście: char

Returns the character at the given text co-ordinates, based on a screen 100 characters wide and 48 characters high, starting at [0 0]. This is regardless of the current text size or screen width, so factor accordingly.

show readtextpos [20 20]

resettext

text

Wejście: none
Wyjście: none

Resets the text layer to 60 columns, white on black, text size 1, default font.

resettext

restoretext

text

Wejście: none
Wyjście: none

Restores the last text screen saved to the "stack". If there are multiple savetexts, they can be progressively restored by using multiple restoretexts. See savetext

restoretext

rightjustify

text

Wejście: none
Wyjście: none

Right-justifies text output using print. See leftjustify

rightjustify

savetext

text

Wejście: none
Wyjście: none

Saves the contents of the text screen to a "stack", see restoretext

savetext

setcursor

text

Wejście: [column (number) | row (number)] (list)
Wyjście: none

Moves the text cursor to the specified column (x) and row (y).

setcursor [10 10]

setcursorchar

text

Wejście: char (word)
Wyjście: none

Sets the text cursor to the provided character.

setcursorchar "X

settextbackground

Także: settb

text

Wejście: color (number)
Wyjście: none

Sets the text background color to the provided number.

settextbackground 5
settextbackground yellow

settextcolor

Także: settc

text

Wejście: foregroundcolor (number) | backgroundcolor (number)
Wyjście: none

Sets the text color. Requires both foreground and background text colors to be specified. See settextforeground and settextbackground

settextcolor [2 15]

settextfont

text

Wejście: font-id
Wyjście: none

Sets the text font, based on a font-id number. 0 is the default high-resolution font. 1 is the Apple II system font. 2 - 5 are stylised low-resolution fonts (fantasy, computer, sci-fi)

settextfont 1

settextforeground

Także: settf

text

Wejście: color (number)
Wyjście: none

Sets the text foreground color to the provided number.

settextforeground 2
settextforeground blue

settextshade

Także: setts

text

Wejście: number
Wyjście: none

Sets the 'shade' or brightness of the text color. settextshade can take a value from 0 (normal) to 15 (darkest). Negative values are not valid for settextshade. Affects both foreground _and_ background. Note that the prompt resets the text shade and so its effect will not be obvious if you simply enter it at the prompt!

settextshade 10

settextsize

text

Wejście: size (number)
Wyjście: none

Sets the text size, where 0 is the smallest text size.

settextsize 1

settextwindow

text

Wejście: x1 y1 x2 y2 (list)
Wyjście: none

Sets the area of the text screen to write in. Note that the parameters are based on a 100 by 48 column screen, regardless of current text size.

settextwindow [10 10 70 30]

setwidth

text

Wejście: columns (number)
Wyjście: none

Sets the width of the text screen in columns. Valid values are 40, 50, 60, 80 and 100.

setwidth 60

show

text

Wejście: input
Wyjście: none

Prints the supplied input to the screen (or file if setwrite is enabled), with brackets around lists, if appropriate, followed by a carriage return. Compare with print, type

show [duck pig]
[duck pig]

showcolors

Także: sc

text

Wejście: none
Wyjście: none

Shows a colored list of built-in colors. The following colors have named primitives that return their numerical value (eg black returns 0):

	black
	red
	blue
	magenta
	green
	grey
	mediumblue
	lightblue
	brown
	orange
	lightgrey
	pink
	lightgreen
	yellow
	cyan
	white
setfillcolor red
setpencolor blue

showcursor

text

Wejście: none
Wyjście: none

Shows the text cursor.

showcursor

splitscreen

Także: ss

text

Wejście: none
Wyjście: none

Displays the bottom 4 (in 24 line mode, 8 in 48 line mode, 2 in 12 line mode) lines of the text screen superimposed on the full graphics camera image. This is the default when turtleSpaces starts up. See fullscreen (no text), textscreen (only text), overlayscreen (full text overlaid on graphics)

splitscreen

textbackground

text

Wejście: none
Wyjście: number

Returns the current text background color. See settextbackground

show textbackground

textcolor

text

Wejście: none
Wyjście: list

Returns the current text colors (foreground and background) as a list. See settextcolor

show textcolor

textfont

text

Wejście: none
Wyjście: number

Returns the index of the current text font. See settextfont

show textfont

textforeground

text

Wejście: none
Wyjście: number

Returns the current text foreground color. See settextforeground

show textforeground

textsize

text

Wejście: none
Wyjście: number

Returns the current text size. See settextsize

show textsize

textshade

text

Wejście: none
Wyjście: number

Returns the current textshade value.

show textshade

textwindow

text

Wejście: none
Wyjście: list

Returns the current dimensions of the text window.

show textwindow

type

text

Wejście: word, number or [list]
Wyjście: none

Outputs the specified data to the screen without following it by a carriage return. See print, show

type "frog type "pig
frogpig

width

text

Wejście: none
Wyjście: number

Returns the width of the text screen.

show width