Tutorial from a Box #1 Intro and Print

View previous topic View next topic Go down

Tutorial from a Box #1 Intro and Print

Post  boxtropica on Sat Sep 08, 2012 9:00 pm

Petit computer runs with a language called Petit Basic.
This language is very BASIC. Haha, I know puns aren't funny. I just couldn't help myself.
Ok, now, lets pop out Petit Computer.
When you start up Petit Computer you should see 'Write Program'.
Select 'Write Program'

You will see a keyboard and a screen of which you can type things above it.



Now lets get down to a few commands.
Go ahead and type in your name.



Since, mine is boxtropica I typed in 'boxtropica'
Now press 'Enter' on the keyboard.
You should see 'Syntax Error'



You might be wondering why your name is a 'Syntax Error'
That's because your name is not in the Basic scripting language.
Now, tap 'EDIT' on the keyboard to go into edit mode.
This is the editor. This is what you will use to create programs.
If you want the program to display your name, we can use the print command.

Time to make your first program!
As tradition, when developers or programmers start a scripting language make the program display the words 'Hello World'
Now, it's your turn to continue this tradition!
To display text you will use the PRINT command.
If you want to display the text 'box' then you would use the command 'PRINT'
PRINT works by typing PRINT then putting quotation marks after it, like a book.
In example:
PRINT "Hello World"

Now, go ahead and type PRINT "Hello World" into the editor.

So, now lets run it. After you make a program in the editor, you press the start button on your DSi/3DS the program should start.
You should see this:



Good Job! You made your first program! Now, lets de-clutter up the text on the screen.
In RUN Mode (What you saw before you went into EDIT mode) type 'CLS' then hit 'ENTER'
and everything should disappear. CLS can also be used in a program, but that will be mentioned more in the next tutorial. I hoped I helped you! If you have any questions please feel free to reply below, or email me at moomantri@yahoo.com
Next tutorial soon!
avatar
boxtropica
Admin

Posts : 26
Join date : 2012-09-06

View user profile http://conlogxl.forumotion.com

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum