Microsoft Small Basic

Intro To Turtle Graphics

Modified: 2009/11/12 22:05 by 66.91.248.124 - Uncategorized
Nouns & Verbs in Smallbasic

In English, we would say :
  Show   the  Turtle
  {verb}      {noun} 

However, In small basic we start by getting the attention of the noun:

Turtle

Now, that we have the turtle's attention, we can make the turtle do something. In English we use spaces to connect the words. But in Small basic we use the dot (.)

Turtle.

At this point a list of activities that we can ask the turtle to do appears. In this case we want the turtle to show itself. So we are going to say:
Turtle.Show()

Why the Parentheses () ? We might need more information for the turtle to complete the action. For Example, what if we wanted to say : Move the Turtle 100 pixels

You would say
Turtle.move(100)
Try it... we'll wait. The parentheses give us the option to give these extra details, but sometimes there are no extra details to give. In those cases we just have the empty parentheses.

ScrewTurn Wiki version 2.0.35. Some of the icons created by FamFamFam.