Learning Objectives
Video LessonsReference
Testing for UnderstandingRelated LinksLogo How-TosLogo in your browserLogo SoftwareLogo OrganizationsLogo ForumsThe work on this shelf is powered by you andMicroWorlds Web Player is officially supported under Internet Explorer or Netscape 4 or higher |
Instruction ListsReview of Words and ListsBefore we get started talking about instruction lists, let's review a little about words and lists. We know that words are a group of characters that usually start with a quotation mark, like: "ball "yx%q "Dolores Numbers are a special kind of word that don't need quotation marks: 8 34 0.1 Words are used as input by commands and reporters: fd 50 ; fd is a command that needs one input. fd likes numbers for its input. There are reporters that output words. For example, xcor, ycor, heading, sum and random all output numbers. The reporter word combines its two inputs into one word: show word "star "fish There are also commands and reporters that like lists as input. For example: setpos [-40 22] There are also reporters that report lists, but we will save them for another lesson. What's important for now is this: Words or lists can be inputs or outputs of a procedure Lists in the Command Center and Lists in Procedure TabsLists are treated a little differently in the Command Center and Procedure Tabs. In the Command Center, Foo decides a list is finished when: Foo sees a closing bracket, like the ] in [-40 22] OR everyone [clickon] In the Procedures Tab, Foo has a different way of deciding if instructions are complete. Foo uses key words like to and end to mark the beginning and end of the group of instructions that make up the procedure (Foo can also mark the end of a procedure with the key words stop, output, or stopall, which we will talk about in another lesson). So, in the Procedures Tab, a list can begin on one line and end on another: to transformToCow This is convenient for programmers like you, because it means you can write procedures that are easier to read. Writing Procedures with Instruction ListsInside procedures, you can also write instruction lists that start on one line and end on another: to go About the Center for Talent DevelopmentCenter for Talent Development (CTD), housed at Northwestern University's School of Education and Social Policy, is an accredited learning center and research facility that identifies, educates and supports gifted students and their families and serves as a leader in gifted education. Learn more about the Center for Talent Development. |
Leone Learning Systems, Inc. (LLS) is a North Shore company that provides online courses for kids anywhere and local teaching and tutoring services for students in Chicago and the Northern Suburbs of Chicagoland. LLS also provides a free geometry software package for children age 6 and up, and free resources for teachers and parents. This site includes information about classes taught, availability for tutoring, learning activities for kids, lesson plans, and ongoing software and curriculum research and development efforts. |
|