; V15 Logo language and turtle-graphics survey.
DEFAULTBITMAP 96 96
CS
CLEAN
HOME
SETPC 14
SETBG 1
PENSIZE 2
PD
FD 10
RT 90
FD 5
LT 45
BK 3
PU
SETH 180
SETXY 4 5
SETPOS [6 7]
SETSCRUNCH 1
PENREVERSE
FILL
LABEL "v15
HT
ST
TEXTSCREEN
FULLSCREEN
SPLITSCREEN
CT

MAKE "value SUM 20 22
PRINT :value
PRINT THING "value
PRINT DIFFERENCE 8 3
PRINT PRODUCT 3 4
PRINT QUOTIENT 12 3
PRINT REMAINDER 13 5
PRINT POWER 2 3
PRINT ABS -4
PRINT INT 4.8
PRINT ROUND 4.5
PRINT SQRT 81
PRINT SIN 90
PRINT COS 0
PRINT RANDOM 1
IF GREATERP 3 2 [ PRINT "greater ]
IF LESSP 2 3 [ PRINT "less ]
IF EQUALP 2 2 [ PRINT "equal ]
IFELSE 0 [ PRINT 0 ] [ PRINT 1 ]
REPEAT 2 [ FD 1 ]
MAKE "count 0
WHILE LESSP :count 2 [ MAKE "count SUM :count 1 ]

MAKE "items LIST 1 2 3
PRINT FIRST :items
PRINT LAST :items
PRINT ITEM 2 :items
MAKE "front FPUT 0 :items
MAKE "back LPUT 4 :front
PRINT FIRST BUTFIRST :back
PRINT LAST BUTLAST :back

TO double :x
  LOCAL "scratch
  MAKE "scratch SUM :x :x
  OUTPUT :scratch
END

TO stopped
  STOP
END

PRINT double 5
stopped
