{"id":20761895,"url":"https://github.com/james-p-d/logo","last_synced_at":"2026-04-29T19:34:15.774Z","repository":{"id":170649449,"uuid":"194166805","full_name":"James-P-D/Logo","owner":"James-P-D","description":"A C# WinForms implementation of the educational programming language Logo with the addition of variables, evaluations and basic control functions (if/then/else/loops etc.)","archived":false,"fork":false,"pushed_at":"2021-07-04T20:39:33.000Z","size":4727,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-14T04:42:53.486Z","etag":null,"topics":["csharp","educational-programming-language","imperative-programming","interpreter","logo","turtle","variables","winforms"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/James-P-D.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-27T21:41:18.000Z","updated_at":"2022-04-06T23:02:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"0bc9b5bc-6dd2-472f-9e75-6c525ae45422","html_url":"https://github.com/James-P-D/Logo","commit_stats":null,"previous_names":["james-p-d/logo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/James-P-D/Logo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/James-P-D%2FLogo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/James-P-D%2FLogo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/James-P-D%2FLogo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/James-P-D%2FLogo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/James-P-D","download_url":"https://codeload.github.com/James-P-D/Logo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/James-P-D%2FLogo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32441277,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T18:12:22.909Z","status":"ssl_error","status_checked_at":"2026-04-29T18:11:33.322Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","educational-programming-language","imperative-programming","interpreter","logo","turtle","variables","winforms"],"created_at":"2024-11-17T10:27:21.501Z","updated_at":"2026-04-29T19:34:15.757Z","avatar_url":"https://github.com/James-P-D.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Logo\nAn implementation of the educational programming language [Logo](https://en.wikipedia.org/wiki/Logo_(programming_language)) with the addition of variables, evaluations and basic control functions (`repeat`, `if..then..else`, `while`, `break`, `continue` etc.)\n\n![Screenshot](https://github.com/James-P-D/Logo/blob/master/screenshot.gif)\n\n## Commands\n\nBelow is a quick overview of the available commands. For some sample programs, see the [examples](https://github.com/James-P-D/Logo/tree/master/src/Logo/Logo/examples) folder.\n\n## Contents\n\n1. [Basic Movements](#Basic-Movements)\n2. [Colours and Pen Up/Down](#Colours-and-PenUp-PenDown)\n3. [Variables](#Variables)\n4. [Repeat Loops](#Repeat-Loops)\n5. [If..Then..Else, Break and Continue](#If-Then-Else-Break-and-Continue)\n6. [While Loops](#While-Loops)\n\n### Basic Movements\n\nThe turtle can be moved in four directions without turning:\n```\nforward X;\nbackward X;\nleft X;\nright X;\n```\n\nIn each case `X` can be an integer literal, e.g. `forward 100;`, or can be a variable, e.g. `forward length;` (where `length` has been declared as a `number` variable), or it can be an evaluation consisting of integer literals and/or variables, e.g. `forward 2 * length;`.\n\nIt is also possible to rotate the turtle clockwise or anti-clockwise:\n```\nrightturn X;\nleftturn X;\n```\n\nAgain, `X` can be an integer literal, a variable or an evaluation consisting of integers and variables.\n\nIt is also possible to manually set the `X` and `Y` positions, or the direction of the turtle:\n```\nsetx X;\nsety Y;\nsetdirection D;\n```\n\nAs usual, the parameter can be a integer literal, variable or evaluation. When setting the direction, the value `D` will wrap around `0` and `360`.\n\nIf you wish to simply centre the turtle and set the direction to upward (zero) we can use the following command:\n```\ncenterturtle;\n```\n\nWe can toggle the displaying of the turtle with the following commands:\n```\nhideturtle;\nshowturtle;\n```\n\n### Colours and PenUp PenDown\n\nBy default the turtle pen colour will always be black, but it is possible to set the [ARGB](https://en.wikipedia.org/wiki/RGBA_color_model) components:\n```\nsetcolora X;\nsetcolorr X;\nsetcolorg X;\nsetcolorb X;\n```\n\n`X` can be an integer literal, a variable or an evaluation consisting of integers and variables, but the value will be capped to the range `0-255`.\n\nBy default the turtle will always draw lines as it moves across the canvas. If you wish to toggle whether the turtle pen is touching the canvas or not, you will need the following commands:\n```\npenup;\npendown;\n```\n\n### Variables\n\nVariables can be declared using the keyword `number` followed by a variable name. \n```\nnumber length;\n```\n\nOnce variables have been created, we can assign values to them with the assignment operator `=`:\n```\nlength = 10;\n```\n\nIt is also possible to initialise variables:\n```\nnumber width = 15.8;\n```\n\nWe can also initialise variables with evaluations:\n```\nnumber area = length * width;\n```\n\nFinally it is possible to create `boolean` variables:\n```\nboolean bool1;\nboolean bool2 = false;\nboolean bool3 = bool1 \u0026\u0026 bool2;\n```\n\n### Repeat Loops\n\nWe can repeat a set of commands by using the `repeat` command:\n```\nrepeat N {\n  Command1;\n  Command2;\n  ..\n  CommandN;\n}\n```\n\nWhere `N` can be an integer literal, variable or evaluation.\n\nFor example, to draw a square we might use the following:\n```\nrepeat 4 {\n  forward 100;\n  rightturn 90;\n}\n```\n\n### If Then Else Break and Continue\n\nThe interpeter also supports `if..then..else` commands, plus the ability to `break` from loops or to `continue`.\n\nFor example, if we wished to draw a semi-circle we could use the following:\n```\nnumber counter = 0;\nrepeat 36 {\n  if(counter \u003c= 18) {\n    forward 10;\n    rightturn 10;\n  } else {\n    break;\n  }\n  counter = counter + 1;\n}\n```\n\n### While Loops\n\nThe interpeter also supports `while` loops:\n```\nnumber counter = 0;\nwhile (counter \u003c 36) {\n  \n  forward 10;\n  rightturn 10;\n  \n  counter = counter + 1;\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjames-p-d%2Flogo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjames-p-d%2Flogo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjames-p-d%2Flogo/lists"}