Getting Started With SiMPLE

An Introduction To SiMPLE Programming For Total Beginners

[Note: This is "an introduction to beginning programming." It is not "an introduction to computers for someone who has never used a computer before".
It is assumed that you are already familiar with most of the fundamental concepts, such as: how to use a keyboard and mouse, how to open a folder, etc.]


Even though a computer may seem powerful and smart, it's really just a dumb box that can't do anything on its own without first being told what to do and how to do it.

Every amazing and wonderful game, utility, etc. that you have ever used on your computer was created by someone else who "told" your computer how to do all those amazing and wonderful things. But now, we are going to show you how you can use SiMPLE, a very easy (but powerful) FREE programming language, that lets you make your computer do whatever you want it to do!


Tell Me About SiMPLE
(If you don't already know what it is)

Before you can start using SiMPLE, you will first need to download it. . . if you haven't already done so.

Show Me How To Download My FREE Copy Of SiMPLE


Ok, now that you've got SiMPLE downloaded, let's start having some fun with it!

(Note: If your computer has anti-virus software installed, you might want to temporarily disable it while
using SiMPLE. Otherwise it might mistakenly think that the programs you create might be viruses! )

Open the "SiMPLE Projects" folder that you got when you installed the SiMPLE package. (If you've installed SiMPLE onto your computer's main "C:" drive, the "SiMPLE Projects" folder is on your desktop. If you've installed SiMPLE onto some other drive [such as a flash drive], the "SiMPLE Projects" folder is in the root directory of the drive.)

Inside the "SiMPLE Projects" folder you will find several other folders, one of which is named "Playroom" and one of which is named "Samples".

(The above image might look different on your computer, depending on such things as: the version of SiMPLE
that you are currently using, the version of Windows that you are using, how you've configured Windows, etc.)

Open the "Samples" folder. In there you will find a lot of text files, a "S i M P L E" shortcut (a toy block), and some other stuff as well.

(The above image might look different on your computer, depending on such things as: the version of SiMPLE
that you are currently using, the version of Windows that you are using, how you've configured Windows, etc.
Also, if you've installed SiMPLE onto your main "C:" drive, you won't have the "Drop SiMPLE Listing Here" icon.)

For the present time, we will be interested only in the text files and the "S i M P L E" shortcut.

Each text file in the "Samples" folder contains a "program listing" (i.e., a set of "instructions" that tells the computer what it should do). Shortly, we will start creating our own program listings. But for now, let's just use the ones that we already have in the "Samples" folder.

The easiest way to run a SiMPLE program listing is by using "Drag & Drop" mode. To do so, just drag and drop any SiMPLE program listing onto the "S i M P L E" icon.*

*Note: On some computers, when using SiMPLE on a drive other than the main "C:" drive, the "S i M P L E" icon might only allow you to use SiMPLE in "Command-line" mode. In that event, find the "Drop SiMPLE Listing Here" icon:



(On some computers, the "Drop SiMPLE Listing
Here" icon might not appear as a "target" image.)

Use that "Drop SiMPLE Listing Here" icon instead of the "S i M P L E" icon to use SiMPLE in "Drag & Drop" mode.

For example, let's try running the "Circles" program listing. Just drag and drop the "Circles" text file onto the "S i M P L E" icon (or, if you're using an external drive, onto the "Drop SiMPLE Listing Here" icon*).

*(If you've installed SiMPLE onto your main "C:" drive, you won't have the "Drop SiMPLE Listing Here" icon.)

A black window will open, and the words "Starting Win-SiMPLE . . . ", "Translating . . . ", and "Compiling . . . " will briefly appear.

IMPORTANT: Once you have dragged any text file onto the "S i M P L E" icon (or onto the "Drop SiMPLE Listing Here" icon) and the black window opens, do not click the window's close button!  The window must be allowed to finish running. (In fact, at this point, its a good idea to take your hands completely off your mouse so that you're not tempted to do any more clicking until you have to. )

Then a black screen will pop open, and some noisy animated circles will appear. (On some computers, the circles might not make any noise at all.)



[If the "Circles" program fails to execute, click here for further instructions.]

Let the program run for as long as you like. When you are ready to stop the program, simply press the "Esc" key on your keyboard.


[Note: Whenever a SiMPLE program finishes running, some versions of Windows might display a dialog box saying that
the program might not have executed properly. If you get such a message, just ignore it (i.e., just close the dialog box).]


Most of the program listings in the "Samples" folder are merely intended to illustrate some of the capabilities of SiMPLE. As such, those programs are not necessarily meant to be entertaining and/or useful for anything in particular. But go ahead and try running some of them anyway. Just drag and drop any one of them onto the appropriate "runner" icon (either the "S i M P L E" icon or the "Drop SiMPLE Listing Here" icon):

             

Then, after the program starts executing, simply press the "Esc" key to end the program (unless otherwise instructed).

Note: As you try running the other program listings, be sure to end each previous program before trying to run the next one. Otherwise you will probably get a message saying "SiMPLE is currently busy". (SiMPLE is able to process no more than one program listing at a time. Read more about it here.)


Now that you know how to run a SiMPLE program listing, let's start creating our own SiMPLE program listings! (But, before we begin, just remember . . . you can't run until you first know how to walk . . . and you can't walk until you first know how to crawl. So the first programs that we create might not seem very impressive to you. But be patient. With enough practice, you will eventually be able to do some pretty amazing things!)

Project Folders

A "project folder" is merely a special folder that is designed to hold your SiMPLE program listings. Every program listing should exist in a project folder inside your "SiMPLE Projects" folder.

Note: Unless you've installed SiMPLE onto your "C:" drive, you should not move the
"SiMPLE Projects" folder. It must remain on the same drive where it was installed.

The only project folder that we have been working with so far is the "Samples" project folder. But that folder is already starting to become rather full. So let's now change to the project folder named "Playroom" which is less cluttered. The "Playroom" folder is a convenient place where you can practice writing your own programs. (Later on, you'll see how to create as many other project folders as you may need. But for now, let's just use the "Playroom" folder to hold the program listings that we will be creating.)

Our First SiMPLE Program!

Ok, let's get started! First, open the "Playroom" folder and create a new text document inside it. (Right-click anywhere on the white portion of the open "Playroom" window and select "New", and then select "Text Document".)

(The above image might look different on your computer, depending on such things as: the version of SiMPLE
that you are currently using, the version of Windows that you are using, how you've configured Windows, etc.
Also, if you've installed SiMPLE onto your main "C:" drive, you won't have the "Drop SiMPLE Listing Here" icon.)

Next, open the newly created text document (by double-clicking it) and type the word Win-SiMPLE on the top line.

Although it is no longer necessary to do so, we suggest that you begin every SiMPLE program listing with the word Win-SiMPLE (with an upper-case "W" in the word "Win") on the first line of the listing. (In some of the older versions of SiMPLE, that "Win-SiMPLE" line was required. But not anymore.) After that first line, whatever instructions you put into the rest of the listing are up to you.

For our first program, let's have the computer do nothing more than draw a circle somewhere on the screen. So, on the second line of our new text document, type: Call circle (300, 200, 100)

By the way, when creating a program listing, you can put as many spaces anywhere you want . . . or leave them out completely if you so choose. In most of the program listings that we will be creating, SiMPLE will ignore any spaces that you type. So, if you wanted to, you could type the second line like this:

   Callcircle(300,200,100)

with no spaces at all. Or you could even type it like this:

   Ca l   lci    rcl e (30   0, 20 0,1     00 )

with spaces all over the place! Either way will work. However, the letter "C" in the word "Call" must be a capital letter.

When you've finished typing, close the text document (by clicking the "x" button in the upper-right corner of the window) and, when asked if you want to save the changes, click the "Save" button.

Then run the program by dropping the "New Text Document" file onto the the appropriate "runner" icon:

             

If you didn't make any typing mistakes you should see a white circle appear somewhere on your display.

Note: Whenever you see the "press any key..." message on the black screen, pressing any
key will close the screen. (Sometimes pressing a mouse button will also close the screen.)

Congratulations! You've just written and executed your first SiMPLE computer program! (Now, that wasn't so hard, was it?)

Question: In our program, what do the numbers "300, 200, 100" mean?

Answer: They are called "parameters". They specify where the circle is to be drawn and how big it should be.

Try changing those three parameters to different numbers, and then run the program listing again to see how the new values affect the size and location of the resulting circle. You will discover that the first parameter (the "300" in our above example) indicates how far over (from the left side of the screen) the circle is to be drawn, the second parameter (the "200") indicates how far down (from the top of the screen), and the third parameter (the "100") indicates how big the circle should be.

Let's Make Another SiMPLE Program!

This time, we'll write a program that draws a red circle and a green square somewhere on the screen.

Once again, first create another new text document inside the "Samples" folder. (Right-click and select "New", and then select "Text Document"). Then open new text document (by double-clicking it) and type the following five lines:

In addition to the "W" in the word "Win" and the "C"s in all of the "Call"s, make sure that you've spelled the word "Red" with a capital "R" and the word "Green" with a capital "G". While spaces don't matter in a SiMPLE program, the use of capital letters is important. (And the general rule is: "Never use capital letters unless they are so indicated." )*

*However, when specifying the name of a color, you have the option of either capitalizing
only the first letter of the name (e.g., Red), or capitalizing all of the letters (e.g., RED).

When you've finished typing, close the text document (by clicking the "x" button in the upper-right corner of the window) and, when asked if you want to save the file, select the "Save" button. Then run the program by dropping the file onto the the appropriate "runner" icon, just as before. If you didn't make any typing mistakes you should see a red circle and a green square appear on your display.

When the computer executes the list of instructions in a program listing, it generally does so by starting at the top of the list and then working its way down toward the bottom, performing one instruction at a time (just like you would probably do if you were given a list of things to do). So the first thing that our program told the computer to do was: "Set red as the color to be used for drawing lines." Then it told the computer to: "Draw a circle 100 units big, and put it 300 units over from the left side of the screen and 200 units down from the top of the screen." So the computer drew a red circle at that location. Next, our program told the computer to: "Set green as the color to be used for drawing lines (and forget about using red)." And finally, it told the computer to: "Draw a square 75 units big, and put it 500 units over from the left side of the screen and 350 units down from the top of the screen." So the computer drew a green square at that location.

In case you are interested, the "units" that we have been talking about are something called "pixels". [A pixel (short for Picture Element) is a single point in a graphic image. Your computer displays pictures by dividing the display screen into thousands of pixels, arranged in rows and columns. The location of each pixel on the screen is specified by giving the column number and the row number at which the pixel exists.]

What Else Can I Do Besides Drawing Circles And Squares?

Don't be misled into thinking that SiMPLE is only good for creating graphics images. SiMPLE is capable of much more than merely letting you use primitive shapes (such as circles, squares, etc.) to make "pretty pictures". As you become more experienced at programming, you will discover that SiMPLE lets you do things like: perform complex mathematical calculations, manipulate strings of text characters, read and write data files to and from disks, . . . just about anything that you might want to do! But most beginning programmers aren't interested in doing those kinds of "boring" things. So we're starting out by just showing you how to do some "visual" kinds of stuff.

The "Vocabulary" of SiMPLE

The three "commands" that we've used so far ("color", "circle", and "square") are referred to as "tasks". (In other programming languages, "tasks" are sometimes referred to as "subroutines".)

Every task exists in something called a "library". In SiMPLE, there are two main types of libraries. The most important one is the "System Library". It contains hundreds of tasks that perform very general and primitive operations (such as drawing a circle, etc.) Inside your "SiMPLE" folder (in your root directory) you will find another folder named "Docs". If you open that "Docs" folder, you will find a text file named "W-Syslib". It contains a description of all the System Library's tasks and functions that are available.

In addition to the System Library, SiMPLE also utilizes a second type of library called an "Append" library. An Append library contains tasks that were written by a third-party supplier (such as a friend . . . or even by you, when you know how!). Such tasks generally perform more specialized functions (such as drawing a rocket, creating an explosion, etc.). SiMPLE comes with one such Append library already preinstalled for you. (It is called the "toys" library.) Inside your "Docs" folder (which is located inside your "SiMPLE" folder) you will find another text file named "Toys-Lib". It contains a list of all the tasks that are in the "toys" library.

The tasks and functions in the System Library, together with the tasks in the Append library(s), constitute most of the "vocabulary" that SiMPLE understands.

When studying a foreign language, knowing as much of the language's vocabulary as possible is important if you want to become fluent in the language. The same holds true for SiMPLE -- you will want to become familiar with as many of SiMPLE's "words" (i.e., tasks and functions) as possible in order to be "fluent in SiMPLE".

You can think of the "W-Syslib" and "Toys-Lib" documents (in SiMPLE's "Docs" folder) as being "dictionaries" that list all the "words" that SiMPLE understands. But. . . they're dictionaries that are intended primarily for experienced programmers. To make things easier for beginning programmers, we've created a separate abridged dictionary of the most commonly used "words" in the SiMPLE libraries. (You will probably want to make a printout of this "Beginner's Dictionary" so that it will always be handy.)

Show Me the "Beginner's Dictionary"

Using the "Beginner's Dictionary"

We've already seen examples of some of the graphics tasks (circle, square, etc.) in the "Beginner's Dictionary". So let's now play around with some of the other tasks that are available.

The "bell" task plays a "bell" sound through the speaker. The "cuckoo" task plays a "cuckoo" sound through the speaker. And the "cls" task can be used to clear the entire screen to a specified color.

Let's write a program that plays three "cuckoo" sounds, then turns the entire display screen red, and then rings a bell five times.

Once again, first create another new text document, and type the following ten lines into it:

Program Listing

When you've finished typing, close the text document and then run the program by dropping the file onto the the appropriate "runner" icon, just as before.

Show Me More!

The "Beginner's Dictionary" contains a task ("showcard") that will display the image of any playing card. And the "messbox" task displays a small window containing a message, along with an "OK" button. Let's use these tasks to write the following little program:

Program Listing

Notice that, even though the general rule is: "Never use capital letters unless they are so indicated," it is OK to use your own capital letters whenever you use them between quote marks (such as when specifying a message that you want to have displayed. Also, when spaces appear between quote marks, SiMPLE does not ignore them.)

Using the "toys" Library

Located near the bottom of the "Beginner's Dictionary" is a list of some of the tasks that exist in the "toys" Append library. Let's write a program that uses the "rocket" task from that "toys" library to draw a red rocket on the screen. (We'll even put a few stars in the sky as well.) And we'll invoke the "explode" task to make the rocket explode when you press any key on the keyboard:

Program Listing

Notice that you must remember to include an "@" character whenever you invoke a task from an Append library, and you must include an appropriate "Append" statement (with a capital "A") at the end of your listing.

At this point, you should spend some time experimenting with the rest of the tasks and functions described in the "Beginner's Dictionary". Knowing how to use as many of those tasks and functions as possible will allow you to create more interesting programs later on.


How Do I Create a New Project Folder?

Creating a new Project folder is almost trivially easy:

  1. Create a new empty folder inside your "SiMPLE Projects" folder.
    (Right-click, select "New", then "Folder")

  2. (Optional): Change the name of that new folder to anything you like.

  3. Copy and paste the "S i M P L E" icon (or the "Drop SiMPLE Listing Here" icon,
    if you are using SiMPLE on an external drive) into that new folder.
... and you're done.

The first time you use the "S i M P L E" icon (or the "Drop SiMPLE Listing Here" icon), it will automatically create for you a Local "Append" Library folder (named "Library") inside your Project folder (so that, if the time comes that you want to start creating your own library modules, you will be all set to do so. )


Conclusion

We have barely scratched the surface of all the different kinds of programs you can create with SiMPLE. But you now know enough to at least start creating your own little fun computer programs.

When you're ready to do so, you should next read our SiMPLE Tutorial to discover many of the other cool things that you can do with SiMPLE.

Let Me Read The SiMPLE Tutorial


Are you sure that your copy of SiMPLE is up-to-date?

Remember to Update it regularly!

(It's fast, and easy to do!)

Site Index
The SiMPLE Entry Page The SiMPLE Homepage What Is SiMPLE? SiMPLE For Non-Programmers How To Download SiMPLE
Getting Started With SiMPLE The SiMPLE Tutorial How To Update SiMPLE The SiMPLE Program Gallery Using SiMPLE To Create Art
The SiMPLE Art Gallery "Digi-Doodles" The "SiMPAINT" Program Some SiMPLE Games The "Kaleidraw" Program
Some Programming Challenges Some Programming Tips The Module Library The Communications Center Using C++ with SiMPLE




  [ Contact Us | Homepage | Online Forums | About the Author ]

Copyright 2011-2014 SiMPLE CodeWorks, Inc. All rights reserved.