Graphics fd bk rt lt st ht pu pd pe px(draws line) home tf(turtle facts) cs fs clean(clears graphics leaves turtlein same position) seth (135) set turtle's bearing to the heading specified. towards [50 50] use seth towards [x y] to point turtle at dot [x y] setpos [50 50] move turtle to specified point setx 50 alters x axis sety 50 alters y axis dot [50 50] draws dot at specified position fence wrap setscrunch 0.1 - 10 setsplit 1 - 40 lower half of screen for text ct clear text cursor (display current cursor position) setcursor [50 50](set cursor position to specified column and row sf screen facts ts devote whole screen to text Logo Graphics Screen y axis [0 260] | | | | | | x axis [-360 0] [0 0] [359 0] | | | | [0 255] Text Screen [0 0]| 1 2 3 4 5 [89 0] |1 | | | | | | | | | | | | | | | | | | | | |2 | | | | | | | | | | | | | | | | | | | | |3 | | | | | | | | | | | | | | | | | | | | [0 30]4 | |x| | | | | | | | | | | | | | | | | | [3 4] Down 1 - 30 rows Across 1 - 89 Output/Input pr :procedure - prints out procedure with carriage return type :procedure - prints out without carriage return show :procedure - prints out with carriage return + lists are printed with brackets po " - prints out " ... is pons - prints out all global variables in po style pops - prints out all procedures definitions pots - prints out titles of procedures poall - prints out all procedures and definitions copyon - echo all print onscreen copyoff - cancel above rc - return to next character typed rq - returns to next word typed rl - returns next word typed read as list noformat :procedure - seems same as pr but uncertain Words & Lists ascii "a returns ascii value of first letter of word/list bf [1 2 3] - returns all but first item of list/letter of word bl [1 2 3] - returns al but last item of list/letter of word char 27 - returns value of character given count [1 2 3] - returns number of items in list/letters in word first [1 2 3] - returns first item last [1 2 3] - returns last item fput 1 [2 3] - joins 1 to 2 3 item 2 [1 2 3] - returns 2 from [1 2 3] lc "proc - lower case uc "proc - upper case (list 1 2 3) - returns list (se 1 2 3) - as list (sentences list too to logo) piece 2 4 [a b c d e] - returns items 2-4 of list shuffle [1 2 3] - randomly shuffles list word("a "n "d) - joins together all inputs to return them as a word where - returns location of tiem in list (use after memberp. eg:- memberp "x [a x b]then where gives 2 Arithmetic arctan 0.707 - returns inverse tangent of values cos 60 - returns cosine of angle in degrees sin 30 - returns sine of angle in degrees int 1.7 - returns integer part of number round 1.7 - returns number rounded to nearest integer quotient 9 2 - returns result of integer division (4 in this case) remainder 9 2 - returns remainder from division (1 in this case) random 100 - returns random number between 1 - 100 rerandom - resets random sequence 1 + 2 - returns result of addition (3) 2 - 1 - returns result (1) 2 * 2 - returns result (4) 9 / 2 - returns floating point result of division Procedures & Variables to - start of procedure end - end of proc local "proc - restricts named variables to current proc and subprocs - use in recursive procs make "proc - set named variable to value given thing "proc - reset to old value pause - wait until user types co - resume proc after pause command label "proc - set up label for go statements to jump to go"proc - go to instruct from label statement if test [c1] [c2] - if condition test true then do command list c1 otherwise do c2 op 10 - exit procedure making value 10 procedures output repeat n [cmnds] - repeat command in brackets n times run [cmnds] - run commands in brackets stop - return to previous procedure orstop if at top level throw "proc - passes control to correspondingly labelled catch use "top level to jumps back to command mode catch "proc - receives control from throw above Conditional Tests (For use with If) dotc [50 50] - returns true if dot at that point emptyp [] - returns true if it is an empty list equalp :fred 1 - returns true if both equivalent memberp 1 [1 2 3] - returns true if item member of list listp :fred - returns output true if valid list numberp 1 - returns true if valid number wordp "fred - returns true if valid word namep "fred - returns true if valid variable name keyp - returns true if key is currently being pressed :x = 50 - returns true if both equal :x > 50 - returns true if first is greater than second :x < 50 - returns true if second is greater than first (:x=50) and (:y=50) - returns true if both true (:x=50) or (:y=50) - returns true if either equal not (:x=50) - returns true if false Property Lists pprop "fred "age 45 - sets up fred to have property age wih value 45 plist "fred - returns curent property list of fred gprop "fred "age - get property (return value of fred's age here glist "age - return all list with age in remprop "fred "age - removes property age from fred's list pps - prints out property list pairs Housekeeping ed "proc - edit procedure edall - edits all known proceds edf "proc - edits file then loads it into logo ern " - erase named procedure nodes - gives measure of free space left recycle - cleans up the internal workspace changef "new "old - change filename on disc from old to new defaultd - display current logged disc drive dir "a: - list all logo programs files on designated drive dirpic "b: - list all logo pictures on designated drive erasefile "filename - erase file mentioned erasepic "filename - as above pic file. load "filename - start program wanted from list of files save "filname - save new if any added onto present one loadpic "proc - display saved pic file savepic "proc - store in memory set "m: set the default drive as designated error - prints out a list of recent errors bye - logs off back to CP/M Debugging trace - display procedure calls as they are executed notrace - turn trace off watch - as trace but pauses at each procedure call nowatch - watch off Advanced Miscellany .contents - display all names logo knows about define "proc - [[arguement_list]][[instruction_list]] equivalent to ...end Allows procs to define other procs. text "proc - prints out as by define .deposit 65300 255 = Basic's POKE .examine 65300 = Basic's PEEK .out 245 1 = Basic's OUT .in 245 = Basic's INP Not known - paddle, pal, wait, tones, buttonp and setpal.