To the Top

Navigation Menu

Search

PHP Online Logo Interpreter & EXE Complier(https://steakovercooked.com/phplogo/)

Changes | Output | Source | Examples | Instructions
No need to install additional software at the client... The server will interpret the Logo program and generate an output.

The source code has been published at www.phpclasses.org and www.phpkode.com, GPL Licence

Updated: 3/Feb/2016: Future updates will be maintained at github: https://github.com/DoctorLai/PHPLogoInterpreter

Do you know LOGO? If You Don't, you can visit Wikipedia for a basic knowledge. Logo is fun, i remember when i was a kid, i was first taught the LOGO , i love it ... During X-mas 2006, i had the idea of programming a basic interpreter for LOGO and finally i made it within three days.

This interpreter, however, is written in PHP. You don't need to download any software. You can just put the Logo Programs in the following textbox and click the 'Run'.

Logo Programming in Chrome Extension

At 22/Feb, 2018, I have developed the first Logo/Turtle Programming that runs in Chrome Extension. This is the client side Javascript implementation of Logo Programming Language. Open Source at:Github


Changes Log: December Christmas, 2011: Version 0.2
  • save as win32 .exe support
  • fix the double recursion problem under PHP5 [post]
  • several bugs fixes and speed improvement in string analysis
  • add dot, dotxy, repcount, pennormal, jump, jmp, walk, turn and some other keywords
December Christmas, 2006: Version 0.1
Image Output 640x480 (16 Colors) (Need 'IFRRAME') - Right Click 'Save-As' Disabled.
If your javascript is disabled...
Logo Source Code Input
-
-
Examples
  • repeat 5[fd 100 rt 144]
  • window repeat 180 [fd 500 bk 500 rt 2]
  • repeat 8 [repeat 20 [lt 170 fd 20 rt 170 fd 20] rt 45]
  • make "x 1 repeat 150 [fd :x rt 89 make "x :x+1]
  • repeat 8 [repeat 4 [rt 90 fd 100] bk 100 lt 45]
  • repeat 12 [repeat 75 [fd 100 bk 100 rt 2] fd 250]
  • repeat 5 [repeat 6 [fd 100 lt 72] lt 144]
  • #only for .EXE mode please
    forever 1 [
      setpc :black
      arc 360 100
      seta :hour*30 
      setpc :red
      fd 60
      bk 60
      seta :minute*6
      setpc :blue
      fd 80
      bk 80
      seta :second*6
      setpc :green
      fd 90
      bk 90
      wait 1000
      clear
    ]
      
  • # hello, world
    to helloworld
     hideturtle
     fd 20 left 180
     fd 40 left 180
     fd 20 right 90
     fd 20 left 90
     fd 20 left 180
     fd 40 left 90
     fd 20 left 90
     fd 20 right 90
     fd 20 right 90
     fd 10 right 90
     fd 20 left 90
     fd 10 left 90
     fd 30 left 90
     fd 40 left 180
     fd 40 left 90
     fd 20 left 90
     fd 40 left 180
     fd 40 left 90
     fd 40 left 90
     fd 20 left 90
     fd 20 left 90
     fd 20 left 90
     fd 60 left 90
     fd 40 left 180
     fd 40 left 90
     fd 20 left 90
     fd 20 left 180
     fd 20 left 90
     fd 20 left 90
     fd 40 left 180
     fd 40 left 90
     fd 40 left 90
     fd 20 left 90
     fd 20 left 90
     fd 20 left 90
     fd 40 left 90
     fd 20 right 90
     fd 20 right 90
     fd 5  left 90  
     fd 5  left 90  
     fd 25 left 180
     fd 40 left 90
     fd 40 left 90
     fd 20 left 90
     fd 20 left 90
     fd 20 left 90
     fd 20 left 90
     fd 40 left 180
     fd 40
    end
    
    lt 90 pu fd 200 pd rt 90 helloworld 
    
Instructions

Case In-Sensitive. For Example, make "a 3 is equivant to MaKe "A 3

The Empty Spaces are used to separate the expressions. Write :X+:Y Rather than :X(SPACE)+(SPACE):Y

List of Keywords

  • FORWARD
  • FD
  • WALK
  • JUMP
  • JMP
  • BK
  • RT
  • TURN
  • LT
  • SETPENCOLOR
  • SETPENCOLOUR
  • SETSCREENCOLOUR
  • SETSC
  • DOTXY
  • SETPOS
  • ARC
  • ARC2
  • MAKE
  • LOCALMAKE
  • LOCAL
  • SHOWTURTLE
  • WAIT
  • HIDETURTLE
  • IF
  • IMGH
  • IMGW
  • PRINT
  • SETFLOODCOLOUR
  • SETFLOODCOLOR
  • PENUP
  • PENDOWN
  • CLEANSCREEN
  • BACK
  • RIGHT
  • LEFT
  • SETPC
  • SETSCREENCOLOR
  • REPEAT
  • SETA
  • SETXY
  • SETX
  • SETY
  • TO
  • SETFC
  • SLEEP
  • HT
  • ST
  • PU
  • PD
  • CS
  • CLEAR
  • HOME
  • FENCE
  • WINDOW
  • WRAP
  • FILL
  • END
  • STOP
  • DOT
  • FOREVER

List of Constants

  • PI
  • WIDTH
  • HEIGHT
  • MAXX
  • MAXY
  • MINX
  • MINY
  • ISTRUECOLOR
  • BLACK
  • BLUE
  • GREEN
  • CYAN
  • RED
  • MAGENTA
  • BROWN
  • LIGHTGRAY
  • DARKGRAY
  • LIGHTGREY
  • DARKGREY
  • LIGHTBLUE
  • LIGHTGREEN
  • LIGHTCYAN
  • LIGHTRED
  • LIGHTMAGENTA
  • YELLOW
  • WHITE

List of Global Variables

  • REPCOUNT
  • RANDOM
  • YEAR
  • MONTH
  • DAY
  • HOUR
  • MINUTE
  • SECOND
  • POSX
  • POSY
  • DEGREE
  • SCREENCOLOUR
  • FLOODCOLOUR
  • PENCOLOUR
  • SCREENCOLOR
  • FLOODCOLOR
  • PENCOLOR
  • CURRENTPIXEL

Comments (4)

    1.     - 2017-10-13 11:06:45 PM
 test 

    2.     - 2015-04-08 07:09:34 AM
 Gsus  

    3.     - 2015-04-01 07:52:41 AM
 KYLJEESUS 

    4.     - 2015-04-01 07:03:32 AM
 Eijeesus 


Page Edited: October 30 2020 14:21:09 | RSS Subscription
How to Cook a Perfect Steak? | <meta name="robots" content="noindex, follow" />