Each entry shows its type (C command that produces an effect, O operation that returns a value, P predicate that returns TRUE/FALSE) and its origin: SOLI Logo (the original Logo), Extension (modern addition) or Compatibility (period hardware, no effect).

Sections: The turtle: movement · The turtle: the graphics field · Multiple turtles · Animating turtles · The turtle: the pen · Words and lists: examine · Words and lists: take apart · Words and lists: build and transform · Strings: search, split, clean · Arrays, stacks and queues · Logical values · Arithmetic · Names (variables) · Procedures · Flow control · Property lists · Text output · Keyboard · Mouse · Joysticks · Music · Workspace · Files · Data files (streams) · Original hardware (compatibility) · Miscellaneous

The turtle: movement

FORWARD ncommand
Origin: SOLI Logo · Aliases: AV AVANCE FD

Moves the turtle forward n steps (max 32767). The first decimal is kept.

FD 100
See also: BACK
BACK ncommand
Origin: SOLI Logo · Aliases: BK RE RECULE

Moves the turtle back n steps.

BK 50
See also: FORWARD
RIGHT ncommand
Origin: SOLI Logo · Aliases: RT TD TOURNEDROITE

Turns right (clockwise) by n degrees. n between -360 and 360.

RT 90
See also: LEFT
LEFT ncommand
Origin: SOLI Logo · Aliases: LT TG TOURNEGAUCHE

Turns left by n degrees. n between -360 and 360.

LT 45
See also: RIGHT
HOMEcommand
Origin: SOLI Logo · Aliases: ORIGINE

Sends the turtle back to the center, heading 0, without changing the pen.

HOME
POSoperation
Origin: SOLI Logo

Outputs the current position [x y].

PRINT POS
  -> 0 0
See also: SETPOS XCOR YCOR
SETPOS listcommand
Origin: SOLI Logo · Aliases: FIXEPOSITION FPOS

Moves the turtle through a list of points (even number of coordinates). Keeps the heading; draws if the pen is down.

SETPOS [ 50 80 ]
See also: POS SETXY
SETXY x ycommand
Extension (modern Logo) · Aliases: FIXEXY FXY

Moves the turtle to the point (x, y). Keeps the heading; draws if the pen is down.

SETXY 100 50
See also: SETPOS POS
XCORoperation
Extension (modern Logo)

Outputs the turtle's x coordinate.

PRINT XCOR
  -> 0
See also: YCOR POS
YCORoperation
Extension (modern Logo)

Outputs the turtle's y coordinate.

PRINT YCOR
  -> 0
See also: XCOR POS
HEADINGoperation
Origin: SOLI Logo · Aliases: CAP

Outputs the current heading, 0 to 359.9 (compass, North = 0 = up).

PRINT HEADING
  -> 0
See also: SETHEADING
SETHEADING ncommand
Origin: SOLI Logo · Aliases: FCAP FIXECAP SETH

Sets the absolute heading (compass). n between -360 and 360.

SETHEADING 90
See also: HEADING
TOWARDS [x y]operation
Extension (modern Logo) · Aliases: VERSCAP

Outputs the heading (0-360) to face the point [x y] from the turtle's position.

SETHEADING TOWARDS [ 100 0 ]
DISTANCE [x y]operation
Extension (modern Logo)

Outputs the distance from the turtle to the point [x y].

PRINT DISTANCE [ 30 40 ]
  -> 50
See also: TOWARDS POS
CIRCLE rcommand
Extension (modern Logo) · Aliases: CERCLE

Draws a circle of radius r centred on the turtle: the turtle stays in place (at the centre), heading unchanged.

CIRCLE 50
See also: ARC REPEAT
ARC r cap1 cap2command
Extension (modern Logo)

Draws an arc of radius r centred on the turtle, between compass headings cap1 and cap2 (0 = up, clockwise). The turtle does not move.

ARC 50 0 90
See also: CIRCLE

The turtle: the graphics field

SHOWTURTLEcommand
Origin: SOLI Logo · Aliases: DRAW MONTRETORTUE MT ST

Shows the turtle.

SHOWTURTLE
See also: HIDETURTLE
HIDETURTLEcommand
Origin: SOLI Logo · Aliases: CACHETORTUE CT HT NODRAW

Hides the turtle (drawing is faster).

HIDETURTLE
See also: SHOWTURTLE
SHOWN?predicate
Origin: SOLI Logo · Aliases: SHOWNP VISIBLE?

Outputs TRUE if the turtle is shown.

PRINT SHOWN?
  -> VRAI
SPRITE ncommand
Extension (modern Logo)

Selects the active turtle's shape: 0 = triangle (default), 1 = detailed turtle, 2 = car, 3 to 255 = shapes defined with DEFSPRITE. Each turtle keeps its own shape.

SPRITE 1
DEFSPRITE n listcommand
Extension (modern Logo)

Defines the 16×16 shape number n (3 to 255), then selectable with SPRITE n. The list gives up to 16 rows of 16 characters: '.' = empty, any other character ('X' for instance) = filled. The shape is drawn in the pen color and rotates with the heading. Kept by CLEARSCREEN, cleared by RESET.

DEFSPRITE 3 [ .XXXX. XXXXXX XXXXXX .XXXX. ]
See also: SPRITE
CLEARSCREENcommand
Origin: SOLI Logo · Aliases: CLS CS INIT VE VIDEECRAN

Clears the screen: resets the graphics and the turtle state (center, heading 0, pen down cyan, blue background, FENCE field) and keeps a single turtle, number 0. INIT is an alias (XLogo name).

CLEARSCREEN
See also: CLEAN HOME
CLEANcommand
Origin: SOLI Logo · Aliases: NETTOIE

Clears the field without changing the turtle or pen state.

CLEAN
See also: CLEARSCREEN
BACKGROUNDoperation
Origin: SOLI Logo · Aliases: BG CF SCREENCOLOR

Outputs the graphics background color code.

PRINT BACKGROUND
  -> 4
See also: SETBACKGROUND
SETBACKGROUND n or listcommand
Origin: SOLI Logo · Aliases: FCFG FIXECOULEURFOND SETBG SETSC SETSCREENCOLOR

Sets the graphics background color: palette code 0-15, or [ red green blue ] (3 values 0-255).

SETBACKGROUND 2
SETBACKGROUND [ 30 30 60 ]
SETBORDER n or listcommand
Origin: SOLI Logo · Aliases: FCB

Sets the graphics screen border color: code 0-15, or [ red green blue ] (0-255).

SETBORDER 7
SETBORDER [ 80 80 80 ]
SCALEoperation
Origin: SOLI Logo · Aliases: ECH

Outputs the [horizontal vertical] scales, in percent.

PRINT SCALE
  -> 100 100
SETSCALE listcommand
Origin: SOLI Logo · Aliases: FECH

Sets the horizontal and vertical scales (2 numbers 0 to 200, in %). Stretches the turtle's drawing.

SETSCALE [ 50 100 ]
FENCEcommand
Origin: SOLI Logo · Aliases: CLOS

Bounded field: the turtle refuses to leave the screen (default mode).

FENCE
See also: WRAP WINDOW
WRAPcommand
Origin: SOLI Logo · Aliases: ENR

Wrapped field: the turtle reappears on the opposite edge (torus).

WRAP
See also: FENCE WINDOW
WINDOWcommand
Origin: SOLI Logo · Aliases: FEN

Window field: space extends beyond the visible screen.

WINDOW
See also: FENCE WRAP
DOT listcommand
Origin: SOLI Logo · Aliases: POINT

Lights a list of points (pen color) without moving the turtle.

DOT [ 0 0 50 50 ]
SCENE [instr]command
Extension (modern Logo)

Draws instr in a hidden buffer, then shows it all at once (double buffering). Prevents flicker in animations that CLEAN then redraw every frame. Use it around the drawing of one frame inside a loop.

SCENE [ CLEAN SQUARE ]
See also: CLEAN WAIT

Multiple turtles

SETTURTLE ncommand
Extension (modern Logo) · Aliases: FIXETORTUE

Selects the active turtle n (created if needed, numbers 0 to 1023). Subsequent commands (FD, RT, SETPC...) act on it. Background, scale and field mode stay shared by all turtles.

SETTURTLE 1
See also: TURTLE TURTLES ASK
TURTLEoperation
Extension (modern Logo) · Aliases: TORTUE

Outputs the active turtle number.

PRINT TURTLE
  -> 0
See also: SETTURTLE TURTLES
TURTLESoperation
Extension (modern Logo) · Aliases: NBTORTUES

Outputs the number of existing turtles.

PRINT TURTLES
  -> 1
ASK n listcommand
Extension (modern Logo) · Aliases: DEMANDE

Runs list on turtle n (or on each turtle of a list of numbers) then returns to the previously active turtle.

ASK 1 [ FD 50 ]
ASK [ 0 1 ] [ RT 90 ]
See also: SETTURTLE TURTLE
CLEARTURTLEScommand
Extension (modern Logo) · Aliases: DISTORTUE

Removes all turtles except the first one (#0) and selects it.

CLEARTURTLES
See also: SETTURTLE TURTLES
COLLIDE? listpredicate
Extension (modern Logo) · Aliases: COLLIDEP COLLISION?

Outputs TRUE if the two turtles in the list [ a b ] exist, are visible and overlap (bounding boxes matching each sprite's size). Otherwise FALSE.

PRINT COLLIDE? [ 0 1 ]
  -> FAUX
See also: SETTURTLE SHOWN?

Animating turtles

ANIMATE id x y vitesse modecommand
Extension (modern Logo) · Aliases: ANIME

Automatically moves turtle id toward point (x,y), by `speed` Logo steps per frame, in parallel with the program. mode is a word: "ONCE (go to target then stop), "LOOP (jump back to start and repeat), "PINGPONG (continuous back and forth). Frame rate is set with CADENCE. A manual command (FD, SETXY...) on the turtle stops its animation.

ANIMATE 0 200 100 5 "PINGPONG
STOPANIMATE idcommand
Extension (modern Logo) · Aliases: STOPANIME

Stops the animation (ANIMATE) of turtle id. In parentheses with no argument, (STOPANIMATE) stops all animations. Ctrl+C also stops animations.

STOPANIMATE 1
( STOPANIMATE )
See also: ANIMATE
SETFPS ncommand
Extension (modern Logo) · Aliases: CADENCE

Sets the animation engine's frame rate to n frames per second (1 to 240, default 30). An ANIMATE's speed (steps per frame) is independent of the frame rate.

SETFPS 60
See also: ANIMATE

The turtle: the pen

PENDOWNcommand
Origin: SOLI Logo · Aliases: BAISSECRAYON BC PD

Pen down: the turtle draws as it moves.

PENDOWN
See also: PENUP
PENUPcommand
Origin: SOLI Logo · Aliases: LC LEVECRAYON PU

Pen up: the turtle no longer draws.

PENUP
See also: PENDOWN
PENDOWN?predicate
Origin: SOLI Logo · Aliases: BC? PENDOWNP

Outputs TRUE if the pen is down.

PRINT PENDOWN?
  -> VRAI
See also: PENDOWN PENUP
PENCOLORoperation
Origin: SOLI Logo · Aliases: CC PC

Outputs the pen color code.

PRINT PENCOLOR
  -> 6
See also: SETPENCOLOR
SETPENCOLOR n or listcommand
Origin: SOLI Logo · Aliases: FCC FIXECOULEURCRAYON SETPC

Sets the pen color: either a palette code 0-15 (a negative code erases), or [ red green blue ] with 3 values 0-255 for a free color.

SETPENCOLOR 1
SETPENCOLOR [ 255 128 0 ]
SETPENSIZE ncommand
Extension (modern Logo) · Aliases: FIXETAILLECRAYON FTC

Sets the pen width in pixels (minimum 1; default 2).

SETPENSIZE 4
FILLcommand
Extension (modern Logo) · Aliases: REMPLIS

Fills the enclosed area that contains the turtle. Color: the one set by SETFLOODCOLOR if any, otherwise the pen color.

FILL
SETFLOODCOLOR n or listcommand
Extension (modern Logo) · Aliases: FCR SETFC

Sets the flood color used by FILL, separate from the pen color: palette code 0-15, or [ red green blue ] (3 values 0-255). Until it is set, FILL uses the pen color. (FMSLogo compatibility: FILL is based on this color.)

SETFLOODCOLOR 1
SETFLOODCOLOR [ 255 128 0 ]
FLOODCOLORoperation
Extension (modern Logo) · Aliases: CR

Outputs the flood color code (SETFLOODCOLOR). If it has not been set, outputs the pen color (the effective FILL color).

PRINT FLOODCOLOR
  -> 6
LABEL objcommand
Extension (modern Logo) · Aliases: ETIQUETTE

Writes obj in the graphics field at the turtle's position (pen color).

LABEL "BONJOUR
See also: PRINT SETPENCOLOR

Words and lists: examine

EQUAL? obj1 obj2predicate
Origin: SOLI Logo · Aliases: EGAL? EQUALP

Outputs TRUE if obj1 and obj2 are equal. Infix operator: =. Word comparison ignores letter case (EQUAL? "a "A is TRUE); when case matters, compare codes: EQUAL? ASCII :c1 ASCII :c2.

PRINT EQUAL? 2 2
  -> VRAI
EMPTY? objpredicate
Origin: SOLI Logo · Aliases: EMPTYP VIDE?

Outputs TRUE if obj is the empty word or empty list.

PRINT EMPTY? [ ]
  -> VRAI
LIST? objpredicate
Origin: SOLI Logo · Aliases: LISTE? LISTP

Outputs TRUE if obj is a list.

PRINT LIST? [ A B ]
  -> VRAI
WORD? objpredicate
Origin: SOLI Logo · Aliases: MOT? WORDP

Outputs TRUE if obj is a word.

PRINT WORD? "BONJOUR
  -> VRAI
NUMBER? objpredicate
Origin: SOLI Logo · Aliases: NOMBRE? NUMBERP

Outputs TRUE if obj is a number.

PRINT NUMBER? 42
  -> VRAI
MEMBER? obj listpredicate
Origin: SOLI Logo · Aliases: MEMBERP MEMBRE?

Outputs TRUE if obj is a member of list.

PRINT MEMBER? "A [ A B C ]
  -> VRAI
COUNT choseoperation
Origin: SOLI Logo · Aliases: COMPTE

Outputs the number of members of a list, characters of a word, or cells of an array.

PRINT COUNT [ A B C ]
  -> 3
ASCII wordoperation
Origin: SOLI Logo

Outputs the ASCII code of the first character of word (empty word -> 0).

PRINT ASCII "A
  -> 65
CHAR noperation
Origin: SOLI Logo · Aliases: CAR

Outputs the character of code n (modulo 256; 0 -> empty word).

PRINT CHAR 65
  -> A

Words and lists: take apart

FIRST objoperation
Origin: SOLI Logo · Aliases: PREM PREMIER

Outputs the first member of a list (or first character of a word).

PRINT FIRST [ A B C ]
  -> A
LAST objoperation
Origin: SOLI Logo · Aliases: DER DERNIER

Outputs the last member of a list (or last character of a word).

PRINT LAST [ A B C ]
  -> C
BUTFIRST objoperation
Origin: SOLI Logo · Aliases: BF SAUFPREMIER SP

Outputs obj without its first element.

PRINT BUTFIRST [ A B C ]
  -> B C
See also: BUTLAST FIRST LAST
BUTLAST objoperation
Origin: SOLI Logo · Aliases: BL SAUFDERNIER SD

Outputs obj without its last element.

PRINT BUTLAST [ A B C ]
  -> A B
See also: BUTFIRST FIRST LAST
ITEM n choseoperation
Origin: SOLI Logo

Outputs the nth member of a list, the nth character of a word, or cell n of an array (n integer; for an array the origin is taken into account).

PRINT ITEM 2 [ A B C ]
  -> B
PRINT ITEM 2 "CHAT
  -> H
PICK list or wordoperation
Extension (modern Logo) · Aliases: PIOCHE

Outputs a randomly chosen member of a list (or character of a word). (FMSLogo compatibility.)

PRINT PICK [ PILE FACE ]
  -> FACE
See also: ITEM RANDOM COUNT

Words and lists: build and transform

WORD word1 word2operation
Origin: SOLI Logo · Aliases: MOT

Concatenates word1 and word2 into a single word.

PRINT WORD "BON "JOUR
  -> BONJOUR
See also: SENTENCE LIST
SENTENCE obj1 obj2operation
Origin: SOLI Logo · Aliases: PH PHRASE SE

Builds a list from obj1 and obj2 (flattens lists).

PRINT SENTENCE "A "B
  -> A B
See also: WORD LIST
LIST obj1 obj2operation
Origin: SOLI Logo · Aliases: LISTE

Builds the list [obj1 obj2].

PRINT LIST "A "B
  -> A B
See also: WORD SENTENCE
FPUT obj listoperation
Origin: SOLI Logo · Aliases: METSPREMIER MP

Adds obj at the front of list.

PRINT FPUT "A [ B C ]
  -> A B C
LPUT obj listoperation
Origin: SOLI Logo · Aliases: MD METSDERNIER

Adds obj at the end of list.

PRINT LPUT "C [ A B ]
  -> A B C
REVERSE objoperation
Extension (modern Logo) · Aliases: INVERSE

Outputs the list (or word) with its elements in reverse order.

PRINT REVERSE [ A B C ]
  -> C B A
SORT listoperation
Extension (modern Logo) · Aliases: TRIE

Outputs the list sorted: numbers by increasing value, otherwise alphabetically. Stable sort.

PRINT SORT [ 3 1 2 ]
  -> 1 2 3
PRINT SORT [ POMME CERISE BANANE ]
  -> BANANE CERISE POMME
UPPERCASE wordoperation
Extension (modern Logo) · Aliases: MAJUSCULE

Outputs the word in upper case.

PRINT UPPERCASE "bonjour
  -> BONJOUR
See also: LOWERCASE WORD
LOWERCASE wordoperation
Extension (modern Logo) · Aliases: MINUSCULE

Outputs the word in lower case.

PRINT LOWERCASE "BONJOUR
  -> bonjour
See also: UPPERCASE WORD

Strings: search, split, clean

MEMBER chose1 chose2operation
Extension (modern Logo) · Aliases: MEMBRE

Outputs the portion of thing2 (word or list) from the first occurrence of thing1 to the end, or empty if thing1 is absent. On a word, thing1 is a single character.

PRINT MEMBER "C "ABCDE
  -> CDE
PRINT MEMBER "B [ A B C ]
  -> B C
SUBSTRING? chose1 chose2predicate
Extension (modern Logo) · Aliases: SOUSCHAINE? SUBSTRINGP

Outputs TRUE if thing1 is a substring of the word thing2 (case-insensitive). FALSE if either one is a list.

PRINT SUBSTRING? "bc "abc
  -> VRAI
See also: MEMBER MEMBER?
BEFORE? word1 word2predicate
Extension (modern Logo) · Aliases: AVANT? BEFOREP

Outputs TRUE if word1 comes before word2 in alphabetical order (case-insensitive).

PRINT BEFORE? "abc "abd
  -> VRAI
See also: EQUAL? SORT
POSITION chose chaineoperation
Extension (modern Logo)

Outputs the rank (1-based) of the first occurrence of thing in chaine, or 0 if absent. In a word, thing can be a substring; in a list, an element. Case-insensitive. gologo extension.

PRINT POSITION "n "bonjour
  -> 3
PRINT POSITION "B [ A B C ]
  -> 2
SPLIT word separateuroperation
Extension (modern Logo) · Aliases: DECOUPE

Splits word on the separator and outputs the list of pieces (empty pieces are kept). The separator may be a single character or a whole string. gologo extension.

PRINT SPLIT "1-2-3 "-
  -> 1 2 3
PRINT SPLIT "a::b::c "::
  -> a b c
See also: WORD SENTENCE SLICE
SUBSTITUTE ancien nouveau chaineoperation
Extension (modern Logo) · Aliases: SUBSTITUE

Outputs string with every occurrence of the substring old replaced by new. In parentheses, (SUBSTITUTE old new string n) replaces at most n. An empty old is an error. gologo extension.

PRINT SUBSTITUTE "an "AN "banane
  -> bANANe
PRINT ( SUBSTITUTE "a "o "ananas 1 )
  -> onanas
See also: MEMBER WORD
TRIM wordoperation
Extension (modern Logo) · Aliases: ROGNE

Outputs word without leading and trailing blanks (spaces, tabs). Useful on a line read from input. gologo extension.

PRINT TRIM "bonjour
  -> bonjour
See also: LTRIM RTRIM
LTRIM wordoperation
Extension (modern Logo) · Aliases: ROGNEDEBUT

Outputs word without leading blanks. gologo extension.

PRINT LTRIM "bonjour
  -> bonjour
See also: TRIM RTRIM
RTRIM wordoperation
Extension (modern Logo) · Aliases: ROGNEFIN

Outputs word without trailing blanks. gologo extension.

PRINT RTRIM "bonjour
  -> bonjour
See also: TRIM LTRIM
REMOVE chose elementsoperation
Extension (modern Logo) · Aliases: OTETOUT

Outputs elements (list or word) without all members equal to thing. On a word, thing is a single character.

PRINT REMOVE "A [ A B A C ]
  -> B C
See also: REMDUP MEMBER?
DELETE sequence debut longueuroperation
Extension (modern Logo) · Aliases: OTE

Outputs sequence (word or list) without length elements starting at start (1-based). Removes by position (unlike REMOVE, which removes by value). gologo extension.

PRINT DELETE "bonjour 2 3
  -> bour
PRINT DELETE [ A B C D ] 2 2
  -> A D
REMDUP elementsoperation
Extension (modern Logo) · Aliases: SANSDOUBLONS

Outputs a copy of elements with duplicates removed: if a member appears several times, the rightmost one is kept.

PRINT REMDUP [ A B C C B ]
  -> A C B
See also: REMOVE SORT
REPLACE sequence n argoperation
Extension (modern Logo) · Aliases: REMPLACE

Outputs sequence (word or list) with item number n replaced by arg (1-based). Non-destructive (outputs a new value). From XLogo.

PRINT REPLACE [ A B C ] 2 8
  -> A 8 C
PRINT REPLACE "chat 1 "r
  -> rhat
INSERTITEM sequence n argoperation
Extension (modern Logo) · Aliases: AJOUTE

Outputs sequence (word or list) with arg inserted at position n (n from 1 to length+1). From XLogo.

PRINT INSERTITEM [ A B C ] 2 8
  -> A 8 B C
PRINT INSERTITEM "cat 2 "h
  -> chat
See also: REPLACE FPUT LPUT
SLICE sequence debut finoperation
Extension (modern Logo) · Aliases: TRANCHE

Outputs the subsequence from start to end inclusive (1-based, like ITEM); the type follows the input (word or list). (SLICE sequence start) goes to the end. Out-of-range bounds are clamped. gologo extension.

PRINT SLICE "bonjour 2 4
  -> onj
PRINT ( SLICE "bonjour 4 )
  -> jour
PRINT SLICE [ A B C D ] 2 3
  -> B C
See also: ITEM FIRST LAST SPLIT

Arrays, stacks and queues

ARRAY tailleoperation
Extension (modern Logo) · Aliases: TABLEAU

Outputs an array of size cells, each initially the empty list (not 0: initialise the cells before using them as counters or flags). (ARRAY size origin) sets the first cell's index (1 by default). An array is mutable and shared by reference. From FMSLogo.

SHOW ARRAY 3
  -> { }
MAKE "T ( ARRAY 3 0 )
MDARRAY listtaillesoperation
Extension (modern Logo) · Aliases: TABLEAUMD

Outputs a multi-dimensional array: one dimension per size in the list (positive sizes). (MDARRAY sizelist origin) sets the origin. From FMSLogo.

SHOW MDARRAY [ 2 2 ]
  -> {{ } { }}
LISTTOARRAY listoperation
Extension (modern Logo) · Aliases: LISTEVERSTABLEAU

Outputs an array with the same elements as the list. (LISTTOARRAY list origin) sets the origin. From FMSLogo.

SHOW LISTTOARRAY [ 1 2 3 ]
  -> {1 2 3}
See also: ARRAYTOLIST ARRAY
ARRAYTOLIST tableauoperation
Extension (modern Logo) · Aliases: TABLEAUVERSLISTE

Outputs the list of the array's cells (first cell first, whatever the origin). Handy to process an array with MAP/FILTER. From FMSLogo.

SHOW ARRAYTOLIST LISTTOARRAY [ 1 2 3 ]
  -> [1 2 3]
See also: LISTTOARRAY ARRAY
MDITEM listindices tableaumdoperation
Extension (modern Logo) · Aliases: ITEMMD

Outputs the cell of a multi-dimensional array, selected by a list of indices. From FMSLogo.

PRINT MDITEM [ 1 ] LISTTOARRAY [ 7 8 9 ]
  -> 7
SETITEM indice tableau valeurcommand
Extension (modern Logo) · Aliases: FIXEITEM

Replaces cell index of the array with value (mutates the array in place). Refuses to create a cycle (value must not contain the array). From FMSLogo.

MAKE "T ARRAY 3 SETITEM 2 :T 9 PRINT ITEM 2 :T
  -> 9
See also: ITEM ARRAY COPYARRAY
MDSETITEM listindices tableaumd valeurcommand
Extension (modern Logo) · Aliases: FIXEITEMMD

Replaces a cell of a multi-dimensional array (selected by a list of indices) with value. Refuses cycles. From FMSLogo.

MAKE "T MDARRAY [ 2 2 ] MDSETITEM [ 1 2 ] :T 5 PRINT MDITEM [ 1 2 ] :T
  -> 5
ARRAY? chosepredicate
Extension (modern Logo) · Aliases: ARRAYP TABLEAU?

Outputs TRUE if thing is an array.

PRINT ARRAY? ARRAY 3
  -> VRAI
See also: ARRAY LIST? WORD?
COPYARRAY tableauoperation
Extension (modern Logo) · Aliases: COPIETABLEAU

Outputs a DEEP copy of the array (recursive on sub-arrays, sharing preserved), so the copy can be modified without touching the original. gologo extension.

MAKE "T ARRAY 3 MAKE "C COPYARRAY :T PRINT ARRAY? :C
  -> VRAI
See also: ARRAY SETITEM
SORTARRAY tableaucommand
Extension (modern Logo) · Aliases: ORDONNE

Sorts the array's slots in place (numbers by increasing value, otherwise alphabetically). Modifies the array, like SETITEM; stable sort. Faster than SORT on large data.

MAKE "T LISTTOARRAY [ 3 1 2 ] SORTARRAY :T SHOW :T
  -> {1 2 3}
See also: SORT ARRAY SETITEM
PUSH nomvar valeurcommand
Extension (modern Logo) · Aliases: EMPILE

Adds value to the front of the list named nomvar (stack). Pop it with POP. From FMSLogo.

MAKE "P [ ] PUSH "P 1 PUSH "P 2 SHOW :P
  -> [2 1]
See also: POP QUEUE FPUT
POP nomvaroperation
Extension (modern Logo) · Aliases: DEPILE

Removes and outputs the front element of the list named nomvar (stack, last in first out). From FMSLogo.

MAKE "P [ ] PUSH "P 1 PUSH "P 2 PRINT POP "P
  -> 2
See also: PUSH DEQUEUE FIRST
QUEUE nomvar valeurcommand
Extension (modern Logo) · Aliases: ENFILE

Adds value to the back of the list named nomvar (queue). Dequeue it with DEQUEUE. From FMSLogo.

MAKE "F [ ] QUEUE "F 1 QUEUE "F 2 SHOW :F
  -> [1 2]
See also: DEQUEUE PUSH LPUT
DEQUEUE nomvaroperation
Extension (modern Logo) · Aliases: DEFILE

Removes and outputs the oldest element (at the front) of the list named nomvar (queue, first in first out). From FMSLogo.

MAKE "F [ ] QUEUE "F 1 QUEUE "F 2 PRINT DEQUEUE "F
  -> 1
See also: QUEUE POP FIRST

Logical values

TRUEoperation
Origin: SOLI Logo · Aliases: VRAI

Outputs the word TRUE.

PRINT TRUE
  -> VRAI
See also: FALSE
FALSEoperation
Origin: SOLI Logo · Aliases: FAUX

Outputs the word FALSE.

PRINT FALSE
  -> FAUX
See also: TRUE
AND pred1 pred2predicate
Origin: SOLI Logo · Aliases: ET

Logical AND: TRUE if both predicates are TRUE. In parentheses, accepts several: (AND a b c).

PRINT AND TRUE FALSE
  -> FAUX
PRINT ( AND TRUE TRUE TRUE )
  -> VRAI
See also: OR NOT
OR pred1 pred2predicate
Origin: SOLI Logo · Aliases: OU

Logical OR: TRUE if at least one predicate is TRUE. In parentheses: (OR a b c).

PRINT OR TRUE FALSE
  -> VRAI
PRINT ( OR FALSE FALSE TRUE )
  -> VRAI
See also: AND NOT
NOT predpredicate
Origin: SOLI Logo · Aliases: NON

Logical negation.

PRINT NOT TRUE
  -> FAUX
See also: AND OR
LESS? n1 n2predicate
Origin: SOLI Logo · Aliases: LESSP PLP?

Outputs TRUE if n1 < n2. Infix operator: <.

PRINT LESS? 3 5
  -> VRAI
GREATER? n1 n2predicate
Origin: SOLI Logo · Aliases: GREATERP PLG?

Outputs TRUE if n1 > n2. Infix operator: >.

PRINT GREATER? 5 3
  -> VRAI

Arithmetic

SUM n1 n2operation
Origin: SOLI Logo · Aliases: SOMME

Sum n1 + n2. Infix operator: +.

PRINT SUM 3 4
  -> 7
DIFFERENCE n1 n2operation
Origin: SOLI Logo · Aliases: DIF DIFF

Difference n1 - n2. Infix operator: -.

PRINT DIFFERENCE 10 4
  -> 6
See also: SUM
PRODUCT n1 n2operation
Origin: SOLI Logo · Aliases: PROD PRODUIT

Product n1 * n2. Infix operator: *.

PRINT PRODUCT 6 7
  -> 42
See also: QUOTIENT SUM
QUOTIENT n1 n2operation
Origin: SOLI Logo · Aliases: DIV DIVISE

Quotient n1 / n2 (n2 not 0). Infix operator: /.

PRINT QUOTIENT 20 4
  -> 5
INTQUOTIENT n1 n2operation
Origin: SOLI Logo · Aliases: QUOT

Integer quotient of n1 by n2 (n2 not 0).

PRINT INTQUOTIENT 17 5
  -> 3
REMAINDER n1 n2operation
Origin: SOLI Logo · Aliases: RESTE

Remainder of the integer division of n1 by n2 (n2 not 0).

PRINT REMAINDER 17 5
  -> 2
MODULO n1 n2operation
Extension (modern Logo) · Aliases: MOD

Remainder of n1 divided by n2, with the sign of n2 (differs from REMAINDER for negatives).

PRINT MODULO -17 5
  -> 3
POWER n1 n2operation
Extension (modern Logo) · Aliases: PUISSANCE

Outputs n1 raised to the power n2.

PRINT POWER 2 10
  -> 1024
SQRT noperation
Origin: SOLI Logo · Aliases: RAC RACINE RC

Square root of n (n >= 0).

PRINT SQRT 16
  -> 4
ABS noperation
Extension (modern Logo) · Aliases: VALABS

Absolute value of n.

PRINT ABS -7
  -> 7
See also: ROUND TRUNCATE
MINUS noperation
Extension (modern Logo) · Aliases: MOINS

Outputs the negation of n (-n).

PRINT MINUS 5
  -> -5
INT noperation
Origin: SOLI Logo · Aliases: ENT

Integer part of n (rounded down: INT -1.5 = -2).

PRINT INT 3.7
  -> 3
See also: ROUND TRUNCATE
ROUND noperation
Extension (modern Logo) · Aliases: ARRONDI

Outputs the nearest integer to n.

PRINT ROUND 3.6
  -> 4
See also: TRUNCATE INT
TRUNCATE noperation
Extension (modern Logo) · Aliases: TRONQUE

Outputs the integer part of n (truncated toward zero).

PRINT TRUNCATE 3.9
  -> 3
See also: ROUND INT
RANDOM noperation
Origin: SOLI Logo · Aliases: HASARD

Outputs a random integer between 0 and n-1 (n >= 1). In parentheses, (RANDOM start end) picks between start and end inclusive.

PRINT RANDOM 6
  -> 5
PRINT ( RANDOM 1 6 )
  -> 6
SIN noperation
Origin: SOLI Logo · Aliases: SINUS

Sine of n (n in degrees).

PRINT SIN 30
  -> 0.5
See also: COS TAN ARCTAN
COS noperation
Origin: SOLI Logo · Aliases: COSINUS

Cosine of n (n in degrees).

PRINT COS 60
  -> 0.5
See also: SIN TAN ARCTAN
TAN noperation
Extension (modern Logo) · Aliases: TANGENTE

Tangent of n (n in degrees).

PRINT TAN 45
  -> 1
See also: SIN COS ARCTAN
ARCTAN noperation
Extension (modern Logo) · Aliases: ARCTANGENTE ATAN

Arctangent of n, in degrees.

PRINT ARCTAN 1
  -> 45
See also: TAN SIN COS
EXP noperation
Extension (modern Logo)

Exponential: e to the power n.

PRINT EXP 1
  -> 2.7182818285
See also: LN LOG10 POWER
LN noperation
Extension (modern Logo)

Natural logarithm of n (n > 0).

PRINT LN 1
  -> 0
See also: EXP LOG10
LOG10 noperation
Extension (modern Logo)

Base-10 logarithm of n (n > 0).

PRINT LOG10 100
  -> 2
See also: LN EXP
PIoperation
Extension (modern Logo)

Outputs the constant pi (3.14159...).

PRINT PI
  -> 3.141592653589793
XOR n1 n2operation
Extension (modern Logo) · Aliases: OUEX

Bitwise exclusive-or of two non-negative integers (XOR 6 3 = 5).

PRINT XOR 6 3
  -> 5
See also: AND OR REMAINDER
TOBASE n baseoperation
Extension (modern Logo) · Aliases: VERSBASE

Writes the integer n in the given base (2 to 36), in upper case: TOBASE 255 16 gives FF. See HEX and BIN for the common cases.

PRINT TOBASE 255 16
  -> FF
See also: FROMBASE HEX BIN
FROMBASE word baseoperation
Extension (modern Logo) · Aliases: DEPUISBASE

Reads the word as a number written in the given base (2 to 36) and outputs its value: FROMBASE "FF 16 gives 255.

PRINT FROMBASE "FF 16
  -> 255
See also: TOBASE HEX BIN
HEX noperation
Extension (modern Logo) · Aliases: HEXA

Shows the integer n in hexadecimal (base 16). Shorthand for TOBASE n 16.

PRINT HEX 255
  -> FF
See also: BIN TOBASE FROMBASE
BIN noperation
Extension (modern Logo) · Aliases: BINAIRE

Shows the integer n in binary (base 2). Shorthand for TOBASE n 2.

PRINT BIN 10
  -> 1010
See also: HEX TOBASE FROMBASE

Names (variables)

MAKE word objcommand
Origin: SOLI Logo · Aliases: DONNE FIXE

Gives the name word to object obj (variable). Read its value with :word or THING.

MAKE "AGE 10
MAKE "NOM [ JEAN DUPONT ]
See also: THING LOCAL
THING wordoperation
Origin: SOLI Logo · Aliases: CHOSE

Outputs the thing (value) named by word. :word is short for THING "word.

MAKE "AGE 10 PRINT THING "AGE
  -> 10
See also: MAKE
NAME? wordpredicate
Origin: SOLI Logo · Aliases: NAMEP NOM?

Outputs TRUE if word names a thing (defined variable).

PRINT NAME? "AGE
  -> FAUX
LOCAL word or listcommand
Extension (modern Logo)

Declares one or more variables local to the current procedure: MAKE then only affects the local copy, not the global of the same name.

LOCAL "COMPTE
LOCAL [ X Y ]
See also: MAKE TO

Procedures

TO word :d1 :d2 ...command
Origin: SOLI Logo · Aliases: POUR

Defines a procedure named word, with optional parameters. End with END.

TO CARRE REPEAT 4 [ FD 50 RT 90 ] END
See also: END EDIT
ENDcommand
Origin: SOLI Logo · Aliases: FIN

Ends a procedure definition (TO ... END).

TO CARRE FD 50 END
See also: TO
OUTPUT objcommand
Origin: SOLI Logo · Aliases: OP RENDS RET RETOURNE

Ends the current procedure, outputting obj (makes it an operation).

OUTPUT :N * 2
See also: STOP
STOPcommand
Origin: SOLI Logo

Immediately ends the current procedure.

IF :N = 0 [ STOP ]
See also: OUTPUT IF
PROCEDURE? wordpredicate
Origin: SOLI Logo · Aliases: PROC? PROCEDUREP

Outputs TRUE if word is the name of a user procedure.

PRINT PROCEDURE? "CARRE
  -> FAUX
PRIMITIVE? wordpredicate
Origin: SOLI Logo · Aliases: PRIM? PRIMITIVEP

Outputs TRUE if word is the name of a primitive.

PRINT PRIMITIVE? "AVANCE
  -> VRAI
EDIT [ word ... ]command
Origin: SOLI Logo · Aliases: ED EDITE

Opens the full-screen editor (and stops any running animations). EDIT alone reopens the buffer; EDIT "NAME or EDIT [ A B ] edits procedures; EDIT [ ] starts empty. Ctrl+S saves, Ctrl+X quits without saving.

EDIT "CARRE
See also: TO LOAD
DEFINE nom textecommand
Extension (modern Logo) · Aliases: DEF DEFINIS

Defines procedure name from data (procedures as data, advanced Logo style). Two accepted forms: UCBLogo-style nested, DEFINE "name [ [inputs] [body] ] ; or XLogo-style 3-argument, DEFINE "name [inputs] [body]. Inverse of TEXT.

DEFINE "CARRE [ [ ] [ REPEAT 4 [ FD 50 RT 90 ] ] ]
DEFINE "POLY [ NB LG ] [ REPEAT :NB [ FD :LG RT 360 / :NB ] ]
See also: TEXT TO
TEXT nomoperation
Extension (modern Logo) · Aliases: TEXTE

Outputs the definition of procedure name as a list [ [inputs] [body] ]. Inverse of DEFINE.

TO CARRE REPEAT 4 [ FD 50 RT 90 ] END SHOW TEXT "CARRE
  -> VOUS VENEZ DE DEFINIR CARRE [[] [REPEAT 4 [FD 50 RT 90]]]
See also: DEFINE PO

Flow control

IF pred listcommand
Origin: SOLI Logo · Aliases: SI

Conditional: runs list if pred is TRUE, otherwise does nothing. For an else branch, see IFELSE.

IF 2 > 1 [ PRINT "OUI ]
  -> OUI
IF :N = 0 [ PRINT "ZERO ]
See also: IFELSE WHILE STOP
IFELSE pred list1 list2command
Origin: SOLI Logo · Aliases: SISINON

Two-branch conditional: runs list1 if pred is TRUE, otherwise runs list2.

IFELSE :N = 0 [ PRINT "ZERO ] [ PRINT "AUTRE ]
See also: IF TEST STOP
REPEAT n listcommand
Origin: SOLI Logo · Aliases: REPETE

Runs list n times (n between 0 and 65535).

REPEAT 4 [ FD 50 RT 90 ]
REPEAT 36 [ FD 20 RT 10 ]
See also: FOR WHILE REPCOUNT
REPCOUNToperation
Extension (modern Logo) · Aliases: COMPTEUR

Outputs the current iteration number of REPEAT (1 to n), or -1 outside a loop.

REPEAT 3 [ PRINT REPCOUNT ]
  -> 1 2 3
See also: REPEAT
WHILE [cond] [instr]command
Extension (modern Logo) · Aliases: TANTQUE

Runs instr while cond evaluates to TRUE (while loop).

WHILE [ :N > 0 ] [ FD 10 MAKE "N :N - 1 ]
See also: REPEAT IF
FOR [var debut fin pas] [instr]command
Extension (modern Logo) · Aliases: REPETEPOUR

For loop: var goes from start to end (by step, default 1); runs instr each time.

FOR [ I 1 4 ] [ FD 50 RT 90 ]
See also: REPEAT FOREACH
RUN listcommand
Origin: SOLI Logo · Aliases: EXEC EXECUTE

Runs list; outputs its result if it is an operation. Building block for control structures.

RUN [ FD 50 ]
RUNRESULT listoperation
Extension (modern Logo) · Aliases: EXECRESULTAT

Runs list like RUN, but wraps the result: outputs [value] if it was an operation, [ ] (empty list) if it was a command. Lets you test whether anything was output.

SHOW RUNRESULT [ SUM 2 3 ]
  -> [5]
SHOW RUNRESULT [ FD 50 ]
  -> []
See also: RUN
TOPLEVELcommand
Origin: SOLI Logo · Aliases: HALT LOGO STOPALL STOPTOUT

Full stop: return to top level.

TOPLEVEL
WAIT ncommand
Extension (modern Logo) · Aliases: ATTENDS

Pauses for n sixtieths of a second (WAIT 60 = 1 second). Interruptible with Ctrl+C.

WAIT 30
RESETcommand
Extension (modern Logo) · Aliases: RAZ

After confirmation (Y/N), resets everything to the startup state: erases procedures and variables, resets the turtle and the screen.

RESET
FOREACH list [instr]command
Extension (modern Logo) · Aliases: POURCHAQUE

Runs instr for each member of a list (or character of a word). Two forms: our form FOREACH list [instr] with the current item in :? ; or the XLogo form FOREACH "var list-or-word [instr] with a named variable (:var).

FOREACH [ 1 2 3 ] [ PRINT :? ]
  -> 1 2 3
FOREACH "I [ 1 2 3 ] [ PRINT :I ]
  -> 1 2 3
See also: MAP FILTER FOR
MAP list [expr]operation
Extension (modern Logo) · Aliases: APPLIQUE

Outputs the list of the template's results applied to each member (:? = member).

PRINT MAP [ 1 2 3 ] [ :? * :? ]
  -> 1 4 9
FILTER list [pred]operation
Extension (modern Logo) · Aliases: FILTRE

Outputs the members of list for which the predicate (:?) is TRUE.

PRINT FILTER [ 1 2 3 4 ] [ :? > 2 ]
  -> 3 4
See also: MAP REDUCE FOREACH
REDUCE list [expr]operation
Extension (modern Logo) · Aliases: REDUIS

Folds the list into one value: :?1 = accumulator, :?2 = current member.

PRINT REDUCE [ 1 2 3 4 ] [ :?1 + :?2 ]
  -> 10
See also: MAP FILTER
CATCH word [instr]command
Extension (modern Logo) · Aliases: PIEGE

Runs instr; catches a THROW with the same tag. Tag ERROR also catches runtime errors.

CATCH "FIN [ THROW "FIN ]
See also: THROW
THROW wordcommand
Extension (modern Logo) · Aliases: LANCE

Stops execution and jumps to the CATCH with the same tag.

CATCH "FIN [ THROW "FIN ]
See also: CATCH
TEST predcommand
Extension (modern Logo) · Aliases: TESTE

Remembers a predicate's result, for IFTRUE / IFFALSE.

TEST 2 > 1 IFTRUE [ PRINT "OUI ]
  -> OUI
See also: IFTRUE IFFALSE IF
IFTRUE [instr]command
Extension (modern Logo) · Aliases: IFT SIVRAI

Runs instr if the last TEST was TRUE.

TEST 2 > 1 IFTRUE [ PRINT "OUI ]
  -> OUI
See also: TEST IFFALSE
IFFALSE [instr]command
Extension (modern Logo) · Aliases: IFF SIFAUX

Runs instr if the last TEST was FALSE.

TEST 1 > 2 IFFALSE [ PRINT "NON ]
  -> NON
See also: TEST IFTRUE

Property lists

PPROP obj prop valeurcommand
Extension (modern Logo) · Aliases: DONNEPROP

Gives object obj the property prop = value (property lists, advanced Logo style). Replaces it if the property already exists.

PPROP "TINTIN "AGE 17
See also: GPROP REMPROP PLIST
GPROP obj propoperation
Extension (modern Logo) · Aliases: PROP

Outputs the value of property prop of object obj, or the empty list [ ] if it does not exist.

PPROP "TINTIN "AGE 17 PRINT GPROP "TINTIN "AGE
  -> 17
See also: PPROP REMPROP PLIST
REMPROP obj propcommand
Extension (modern Logo) · Aliases: EFPROP

Removes property prop from object obj.

REMPROP "TINTIN "AGE
See also: PPROP GPROP PLIST
PLIST objoperation
Extension (modern Logo) · Aliases: LISTEPROP

Outputs the property list of obj: [ prop1 value1 prop2 value2 ... ], or [ ] if obj has no property.

PPROP "TINTIN "AGE 17 SHOW PLIST "TINTIN
  -> [AGE 17]
See also: PPROP GPROP REMPROP

Text output

PRINT objcommand
Origin: SOLI Logo · Aliases: EC ECRIS PR

Prints obj in the text area, then starts a new line. In parentheses, prints several objects separated by a space: (PRINT a b c).

PRINT 5 + 7
  -> 12
PRINT [ BONJOUR LE MONDE ]
  -> BONJOUR LE MONDE
( PRINT "VALEUR 42 )
  -> VALEUR 42
See also: TYPE SHOW
TYPE objcommand
Origin: SOLI Logo · Aliases: TAPE

Prints obj without a new line. In parentheses: (TYPE a b c).

TYPE "BONJOUR
  -> BONJOUR
( TYPE "A "B )
  -> A B
See also: PRINT SHOW
SHOW objcommand
Extension (modern Logo) · Aliases: MONTRE

Like PRINT, but keeps the brackets around lists: SHOW [ A B ] prints [A B]. Variadic in parentheses.

SHOW [ A B C ]
  -> [A B C]
See also: PRINT TYPE
CLEARTEXTcommand
Origin: SOLI Logo · Aliases: VIDETEXTE VT

Clears the text area.

CLEARTEXT
SETTEXTLINES ncommand
Origin: SOLI Logo · Aliases: ME

Sets the number of visible text lines (1-25). SETTEXTLINES 25 = full text (hides graphics); n < 25 = mixed screen (graphics + n text lines).

SETTEXTLINES 25
SETTEXTLINES 5
SETCURSOR [col lig]command
Origin: SOLI Logo · Aliases: FCURS

Places the text cursor: column col (0-39), line lig (0-24). The next PRINT/TYPE writes there.

SETCURSOR [ 10 5 ]
CLEARTEXT SETCURSOR [ 0 24 ] TYPE "BAS
  -> BAS
SETTEXTCOLOR n or listcommand
Origin: SOLI Logo · Aliases: FCT FIXECOULEURTEXTE

Sets the text color: code 0-15, or [ red green blue ] (0-255).

SETTEXTCOLOR 3
SETTEXTCOLOR [ 255 200 0 ]
SETTEXTBACKGROUND n or listcommand
Origin: SOLI Logo · Aliases: FCFT

Sets the text background color: code 0-15, or [ red green blue ] (0-255).

SETTEXTBACKGROUND 4
SETTEXTBACKGROUND [ 20 20 20 ]
See also: SETTEXTCOLOR

Keyboard

READCHARoperation
Origin: SOLI Logo · Aliases: LISCAR

Waits for a keystroke and outputs the typed character (a one-character word). Enter -> carriage return.

MAKE "C READCHAR
READLISToperation
Origin: SOLI Logo · Aliases: LL RL

Waits for a line of input (until Enter) and outputs it as a list of words.

MAKE "L READLIST
READWORDoperation
Extension (modern Logo) · Aliases: LISMOT RW

Waits for a line of input (until Enter) and outputs it as a single word.

MAKE "L READWORD
KEY?predicate
Origin: SOLI Logo · Aliases: KEYP TOUCHE?

Outputs TRUE if a key is available, without waiting (for READCHAR).

IF KEY? [ PRINT "OUI ]
See also: READCHAR READLIST
READ titre wordcommand
Extension (modern Logo) · Aliases: LIS

Displays title (a question) then reads keyboard input and stores it in variable word: a word for a single word, a list for several. (XLogo style, here in text mode.)

READ [ HOW OLD ARE YOU ] "AGE

Mouse

MOUSEPOSoperation
Origin: SOLI Logo · Aliases: POSOPT SOURISPOS

Outputs the mouse position [x y] if the pointer is in the field, otherwise the empty list.

PRINT MOUSEPOS
See also: MOUSEDOWN?
MOUSEDOWN?predicate
Origin: SOLI Logo · Aliases: CONTACT CONTACT? SOURISPRESSEE

Outputs TRUE if a mouse button is pressed.

IF MOUSEDOWN? [ PRINT "CLIC ]
See also: MOUSEPOS

Joysticks

JOYSTICK noperation
Origin: SOLI Logo · Aliases: MANETTE

Outputs the direction of joystick n (0-8): 0 = centered, 1 = up, then clockwise (3 = right, 5 = down, 7 = left, plus diagonals). Emulated with the arrow keys (joystick 0).

IF ( JOYSTICK 0 ) = 1 [ FD 10 ]
See also: BUTTON?
BUTTON? npredicate
Origin: SOLI Logo · Aliases: BOUTON? BUTTONP

Outputs TRUE if joystick n's fire button is pressed. Emulated with the space bar (joystick 0).

IF BUTTON? 0 [ PRINT "FEU ]
See also: JOYSTICK

Music

PLAY note or listcommand
Origin: SOLI Logo · Aliases: JOUE

Plays a single note or a list of notes one after another. Notes: DO RE MI FA SO(L) LA SI, and PA for a rest. Sharp: # (or <#), flat: b (or <b); e.g. FA# or MIb. Each note uses the current OCTAVE/DURATION/TEMPO/TIMBRE. Interruptible with Ctrl+C.

PLAY "DO
PLAY [ DO RE MI FA SOL LA SI ]
PLAY [ DO RE# MI ]
OCTAVE ncommand
Origin: SOLI Logo

Sets the octave of notes played by PLAY (1 to 5, default 4).

OCTAVE 4
See also: PLAY DURATION TEMPO
DURATION ncommand
Origin: SOLI Logo · Aliases: DUREE

Sets the note length (1 to 96, default 24).

DURATION 24
See also: PLAY TEMPO OCTAVE
TEMPO ncommand
Origin: SOLI Logo

Sets the tempo (1 to 255, default 5): higher = faster.

TEMPO 5
See also: PLAY DURATION
TIMBRE ncommand
Origin: SOLI Logo

Sets the timbre, i.e. the sound shape (0-63 square, 64-127 sawtooth, 128-191 triangle, 192-255 sine).

TIMBRE 0
TIMBRE 200
See also: PLAY

Workspace

CONTENTSoperation
Origin: SOLI Logo · Aliases: CONTENU

Outputs the list of all known words (procedures and names).

PRINT CONTENTS
  -> .CHB .DEP .EFT .EXA .RES .ROUT .SER AIDE AJOUTE ANGLAIS ANIME APPLIQUE ARC ARCTAN ARRONDI ASCII ATAN ATTENDS AV AVANCE AVANT? BC BC? BINAIRE BOUTON? CADENCE CAP CAR CATALOGUE CATALOGUEEX CC CERCLE CF CHARGE CHARGEEX CHOSE CLOS COLLISION? COMPTE COMPTEUR CONTACT CONTACT? CONTENU COPIE COPIETABLEAU COS COSINUS CR CT DECOUPE DEF DEFILE DEFINIS DEFSPRITE DEMANDE DEPILE DEPUISBASE DER DERNIER DETRUIS DIF DIFF DISTANCE DISTORTUE DIV DIVISE DONNE DONNEPROP DUREE EC ECH ECRIS ED EFN EFP EFPROP EGAL? EMPILE ENFILE ENR ENT ENTREE ET ETIQUETTE EXEC EXECRESULTAT EXP FAUX FCAP FCB FCC FCFG FCFT FCR FCT FCURS FECH FEN FERME FERMETOUT FICHIERVERSTABLEAU FILTRE FIN FINFICHIER? FINLIGNE FIXE FIXEECRITURE FIXEFINLIGNE FIXEITEM FIXEITEMMD FIXELECTURE FIXEPOSECRITURE FIXEPOSLECTURE FIXETAILLECRAYON FIXETORTUE FLECTEUR FLI FLUXECRITURE FLUXLECTURE FORMATE FPOS FR FRANCAIS FXY HASARD HEXA IM IMNS IMTOUT IMTS INIT INVERSE ITEM ITEMMD JOUE LANCE LC LECTEUR LIS LISCAR LISCARS LISLIGNE LISMOT LISTE LISTE? LISTEPROP LISTEVERSTABLEAU LL LN LOCAL LOG10 LOGO MAJUSCULE MANETTE MD ME MEMBRE MEMBRE? METSDERNIER METSPREMIER MINUSCULE MODULO MOINS MONTRE MOT MOT? MP MT NBTORTUES NETTOIE NOM? NOMBRE? NON OCTAVE ORDONNE ORIGINE OTE OTETOUT OU OUEX OUVREAJOUT OUVREECRITURE OUVRELECTURE OUVREMAJ PH PHRASE PI PIEGE PIOCHE PLACE PLG? PLP? POINT POS POSECRITURE POSITION POSLECTURE POSOPT POUR POURCHAQUE PREM PREMIER PRIM? PROC? PROD PRODUIT PROP PUISSANCE QUITTE QUITTER QUOT RAC RACINE RAMENE RAMENEEX RAZ RC RE RECULE RECYCLE REDUIS REGLE REMPLACE REMPLIS RENDS REPETE REPETEPOUR RESTE RET RETOURNE ROGNE ROGNEDEBUT ROGNEFIN SANSDOUBLONS SAUFDERNIER SAUFPREMIER SAUVE SAUVED SAUVEPNG SCENE SD SI SIFAUX SIN SINUS SISINON SIVRAI SOMME SORTIE SOURISPOS SOURISPRESSEE SOUSCHAINE? SP SPRITE STOP STOPANIME STOPTOUT SUBSTITUE TABLEAU TABLEAU? TABLEAUMD TABLEAUVERSLISTE TAN TANGENTE TANTQUE TAPE TD TEMPO TESTE TEXTE TG TIMBRE TORTUE TOUCHE? TOURNEDROITE TOURNEGAUCHE TOUSOUVERTS TRANCHE TRIE TRONQUE VALABS VE VERSBASE VERSCAP VIDE? VISIBLE? VRAI VT XCOR YCOR
PO wordcommand
Origin: SOLI Logo · Aliases: IM

Prints out the definition of the procedure named word.

PO "CARRE
See also: PONS POALL
POTScommand
Origin: SOLI Logo · Aliases: IMTS

Prints out the titles (TO line) of all procedures.

POTS
PONScommand
Origin: SOLI Logo · Aliases: IMNS

Prints out all names and their things, as MAKE statements.

PONS
See also: PO POALL
POALLcommand
Origin: SOLI Logo · Aliases: IMTOUT

Prints out all procedures (full definitions) then all names.

POALL
See also: PO PONS
ERASE wordcommand
Origin: SOLI Logo · Aliases: EFFACEPROCEDURE EFP ER

Erases the procedure named word.

ERASE "CARRE
ERNAME wordcommand
Origin: SOLI Logo · Aliases: EFFACEVARIABLE EFN ERN

Erases the name (variable) word.

ERNAME "AGE
See also: ERASE ERALL
ERALLcommand
Origin: SOLI Logo · Aliases: .EFT EFFACETOUT

Erases the whole workspace: all procedures and all names.

ERALL
See also: ERASE ERNAME
NODESoperation
Origin: SOLI Logo · Aliases: PLACE

Outputs the number of free memory cells.

PRINT NODES
  -> 60000
RECYCLEcommand
Origin: SOLI Logo

Reclaims unused memory (no effect: Go manages memory).

RECYCLE

Files

SAVE word listcommand
Origin: SOLI Logo · Aliases: SAUVE

Saves to file word the procedures and variables given by list (bare names = procedures, "name = variables, :name = list of names; CONTENTS = everything).

SAVE "DESSIN CONTENTS
See also: LOAD EDLOAD CATALOG
LOAD wordcommand
Origin: SOLI Logo · Aliases: RAMENE

Re-reads file word and DEFINES its contents directly IN THE WORKSPACE: its procedures and variables become usable at once (each procedure prints "X DEFINED"). Nothing else to do. --- Difference with EDLOAD: LOAD defines right away (to USE a program), whereas EDLOAD only puts the file in the editor without running it (to REWORK it).

LOAD "DESSIN
See also: SAVE EDLOAD
EDLOAD wordcommand
Origin: SOLI Logo · Aliases: CHARGE

Loads file word INTO THE EDITOR, WITHOUT running it: its text becomes the editor content (ED with no argument reopens it). You must open ED then validate with Ctrl+S to run it. --- Difference with LOAD: EDLOAD is to READ or EDIT a program before validating it, whereas LOAD defines its contents directly in the workspace (usable right away).

EDLOAD "DESSIN
See also: SAVE LOAD
EDSAVE wordcommand
Origin: SOLI Logo · Aliases: SAUVED

Saves the current editor content to file word.

EDSAVE "DESSIN
See also: SAVE EDLOAD
CATALOGcommand
Origin: SOLI Logo · Aliases: CAT CATALOGUE

Lists the files in the working directory (name and size).

CATALOG
See also: SAVE ERASEFILE
ERASEFILE wordcommand
Origin: SOLI Logo · Aliases: DETRUIS

Permanently deletes file word. Refuses to delete an open file.

ERASEFILE "DESSIN
See also: CATALOG ERASE
CATALOGEXcommand
Extension (modern Logo) · Aliases: CATALOGUEEX CATEX

Lists the example files (name and size), like CATALOG but in the examples directory shipped with GoLogo. Error if there is no examples directory.

CATALOGEX
LOADEX wordcommand
Extension (modern Logo) · Aliases: RAMENEEX

Like LOAD, but reads the file from the examples directory: re-reads it and DEFINES its contents in the workspace (usable at once). Error if the examples directory or the file is missing or unreadable.

LOADEX "DESSIN
EDLOADEX wordcommand
Extension (modern Logo) · Aliases: CHARGEEX

Like EDLOAD, but reads the file from the examples directory: puts its text in the editor WITHOUT running it (EDIT reopens it, validate with Ctrl+S). Error if the examples directory or the file is missing or unreadable.

EDLOADEX "DESSIN
SAVEPNG wordcommand
Extension (modern Logo) · Aliases: SAUVEPNG

Saves the drawing (graphics field) to word.PNG, in the working folder (like SAVE). Asks for confirmation if the file exists.

SAVEPNG "DESSIN
See also: SAVE CATALOG
COPIEcommand
Extension (modern Logo) · Aliases: COPY

"Prints" the screen: saves a numbered PNG screenshot (PAGE_1.PNG, PAGE_2.PNG...) in the PRINTER subfolder of the work directory.

COPIE
FORMAT ncommand
Compatibility (no effect) · Aliases: FORMATE

Formatted a floppy disk (period hardware). No effect here.

FORMAT 0
DRIVEoperation
Compatibility (no effect) · Aliases: LECTEUR

Returned the current disk drive. Not applicable here (outputs 1).

PRINT DRIVE
  -> 1
SETDRIVE ncommand
Compatibility (no effect) · Aliases: FLECTEUR

Selected the disk drive. No effect here.

SETDRIVE 0

Data files (streams)

OPENREAD nomfichiercommand
Extension (modern Logo) · Aliases: OUVRELECTURE

Opens the file for reading (position at the start). Error if the file is missing or already open. From FMSLogo.

OPENREAD "DESSIN.GLG CLOSE "DESSIN.GLG
OPENWRITE nomfichiercommand
Extension (modern Logo) · Aliases: OUVREECRITURE

Opens the file for writing, overwriting any existing content WITHOUT asking (FMSLogo fidelity). Creates it if absent. From FMSLogo.

OPENWRITE "SORTIE.TXT CLOSE "SORTIE.TXT
OPENAPPEND nomfichiercommand
Extension (modern Logo) · Aliases: OUVREAJOUT

Opens the file for writing, position at the end (append). Creates it if absent. From FMSLogo.

OPENAPPEND "JOURNAL.TXT CLOSE "JOURNAL.TXT
OPENUPDATE nomfichiercommand
Extension (modern Logo) · Aliases: OUVREMAJ

Opens the file for reading AND writing (a single, shared position). Creates it if absent. From FMSLogo.

OPENUPDATE "DESSIN.GLG CLOSE "DESSIN.GLG
CLOSE nomfichiercommand
Extension (modern Logo) · Aliases: FERME

Closes the file. If it was the current read/write stream, we revert to keyboard/console. Error if the file is not open. From FMSLogo.

OPENREAD "DESSIN.GLG CLOSE "DESSIN.GLG
CLOSEALLcommand
Extension (modern Logo) · Aliases: FERMETOUT

Closes all open files. From FMSLogo.

OPENREAD "DESSIN.GLG CLOSEALL
See also: CLOSE ALLOPEN
ALLOPENoperation
Extension (modern Logo) · Aliases: TOUSOUVERTS

Outputs the list of names of currently open files. From FMSLogo.

SHOW ALLOPEN
  -> []
See also: CLOSE CLOSEALL
SETREAD nomfichier or listcommand
Extension (modern Logo) · Aliases: FIXELECTURE

Sets the current read stream: READCHAR/READWORD/READLIST/READRAWLINE will read from this file. An empty list [ ] reverts to the keyboard. Error if the file is not open for reading. From FMSLogo.

OPENREAD "DESSIN.GLG SETREAD "DESSIN.GLG SETREAD [ ] CLOSE "DESSIN.GLG
SETWRITE nomfichier or listcommand
Extension (modern Logo) · Aliases: FIXEECRITURE

Sets the current write stream: PRINT/SHOW/TYPE will write to this file. An empty list [ ] reverts to the console. Error if the file is not open for writing. From FMSLogo.

OPENWRITE "SORTIE.TXT SETWRITE "SORTIE.TXT SETWRITE [ ] CLOSE "SORTIE.TXT
READERoperation
Extension (modern Logo) · Aliases: FLUXLECTURE

Outputs the name of the current read stream, or [ ] if it is the keyboard. From FMSLogo.

SHOW READER
  -> []
See also: SETREAD WRITER
WRITERoperation
Extension (modern Logo) · Aliases: FLUXECRITURE

Outputs the name of the current write stream, or [ ] if it is the console. From FMSLogo.

SHOW WRITER
  -> []
See also: SETWRITE READER
EOF?predicate
Extension (modern Logo) · Aliases: EOFP FINFICHIER?

Outputs TRUE if there is nothing left to read in the current read stream. On the keyboard, always FALSE. From FMSLogo.

PRINT EOF?
  -> FAUX
READPOSoperation
Extension (modern Logo) · Aliases: POSLECTURE

Outputs the current read byte position, or -1 if the stream is the keyboard. From FMSLogo.

PRINT READPOS
  -> -1
WRITEPOSoperation
Extension (modern Logo) · Aliases: POSECRITURE

Outputs the current write byte position, or -1 if the stream is the console. From FMSLogo.

PRINT WRITEPOS
  -> -1
SETREADPOS octetcommand
Extension (modern Logo) · Aliases: FIXEPOSLECTURE

Moves the current read pointer to byte position (0-based). Error if the position is out of file or in the middle of a character. From FMSLogo.

OPENREAD "DESSIN.GLG SETREAD "DESSIN.GLG SETREADPOS 0 CLOSE "DESSIN.GLG
SETWRITEPOS octetcommand
Extension (modern Logo) · Aliases: FIXEPOSECRITURE

Moves the current write pointer to byte position (0-based). From FMSLogo.

OPENWRITE "SORTIE.TXT SETWRITE "SORTIE.TXT SETWRITEPOS 0 CLOSE "SORTIE.TXT
READRAWLINEoperation
Extension (modern Logo) · Aliases: LISLIGNE

Reads a raw line from the current read stream and outputs it as a single word (no interpretation). This is THE receiver to walk a file line by line. [ ] at end of file. From FMSLogo.

OPENREAD "DESSIN.GLG SETREAD "DESSIN.GLG PRINT READRAWLINE SETREAD [ ] CLOSE "DESSIN.GLG
READCHARS noperation
Extension (modern Logo) · Aliases: LISCARS RCS

Reads n characters from the current read stream and outputs them as a word. [ ] at end of file. From FMSLogo.

OPENREAD "DESSIN.GLG SETREAD "DESSIN.GLG PRINT READCHARS 4 SETREAD [ ] CLOSE "DESSIN.GLG
FILETOARRAY nomfichieroperation
Extension (modern Logo) · Aliases: FICHIERVERSTABLEAU

Loads a whole text file at once and outputs an array whose cells are its lines (first line in cell 1). COUNT gives the number of lines, for easy iteration. Opens, reads and closes the file on its own. Refuses a binary file (BINARY FILE). gologo extension.

SHOW FILETOARRAY "DESSIN.GLG
MAKE "L FILETOARRAY "DESSIN.GLG PRINT COUNT :L
SETEOL "LF or "CRLFcommand
Extension (modern Logo) · Aliases: FIXEFINLIGNE

Sets the line ending written to files: "LF (default, Unix-style) or "CRLF (Windows-style). Reading always accepts both. gologo extension.

SETEOL "CRLF
EOLoperation
Extension (modern Logo) · Aliases: FINLIGNE

Outputs the current line-ending setting: "LF or "CRLF. gologo extension.

PRINT EOL
  -> LF

Original hardware (compatibility)

REGLEcommand
Compatibility (no effect)

Original light pen. Compatibility: no effect.

REGLE
ENTREE ncommand
Compatibility (no effect)

Selected the input channel. Compatibility: no effect.

ENTREE 1
SORTIE ncommand
Compatibility (no effect)

Selected the output channel (console, printer...). Compatibility: no effect.

SORTIE 2
FLI ncommand
Compatibility (no effect)

Original line fill. Compatibility: no effect.

FLI 1
.SER n1 n2command
Compatibility (no effect)

Serial port (absent on the original). Compatibility: no effect.

.SER 1 2
.CHB word ncommand
Compatibility (no effect)

Binary load into memory. Compatibility: no effect.

.CHB "PROG 0
.RES acommand
Compatibility (no effect)

Reserved memory. Compatibility: no effect.

.RES 0
.DEP a vcommand
Compatibility (no effect)

Stored a byte in memory. Compatibility: no effect.

.DEP 100 0
.ROUT acommand
Compatibility (no effect)

Ran a machine-code routine. Compatibility: no effect.

.ROUT 100
.EXA aoperation
Compatibility (no effect)

Read a byte in memory. Compatibility: always outputs 0.

PRINT .EXA 0
  -> 0

Miscellaneous

HELP [ command ]command
Extension (modern Logo) · Aliases: AIDE

Without argument, lists all commands. With a name (e.g. HELP FORWARD), shows its description, parameters and aliases.

HELP REPEAT
FRENCHcommand
Extension (modern Logo) · Aliases: FR FRANCAIS

Switches help and messages to French. Alias: FR.

FRENCH
ENGLISHcommand
Extension (modern Logo) · Aliases: ANGLAIS EN

Switches help and messages to English. English aliases: ENGLISH, EN.

ENGLISH
BYEcommand
Extension (modern Logo) · Aliases: GOODBYE QUIT QUITTE QUITTER

Quits GoLogo.

BYE