SheerPower® 4GL -- Beyond BASIC --

Tutorial Part 2

FREE!! Download SheerPower 4GL NOW! Documentation SheerPower 4GL Technical Support Options FAQ
Discussion Forum Voice Tours and Tutorials Sample Programs Contact Us
Getting Started

Creating Programs

A Sample Program

Deploying Programs

Running Programs

Sharing Programs


SheerPower 4GL Home

Part 2: Sample Menu Program

  1. Below is the actual code used to create a very simple menu program. Inside the new menu.spsrc file that you created in Part 1 of this tutorial, type or copy and paste the code below into the Main Logic Area. If you did not create the program template, then you can just begin at the first line.


                  do
                    line input menu '"calculator" = calc,"DOS prompt" = dos,"exit"': ans$ 
                    if  _exit  then  exit do
                    select case ans$ 
                    case 'CALC' 
                      pass 'calc' 
                    case 'DOS' 
                      pass '$$' 
                    end select
                  loop
                  end
                      

  2. When you are done, the program file in SPDEV will look like this:

  3. To run this sample program, click on the "Run" icon in the SPDEV toolbar (the running man).

  4. The following menu will appear:

    Click on the calculator item in the menu. The program will run the Windows calculator program.

    Click on DOS prompt in the menu. The program will run the MS DOS Prompt or Command Prompt program.

  5. Click on exit or the [X] to close the menu. The SP4GL Debug Console Window will appear. You can close the console window by typing in exit and pressing the Enter key, or by clicking on the [X] in the top right corner of the window.

  6. At the bottom of SPDEV in the Results Window, the "Build" tab displays the compile information and speed of processing for the program. If you have any compile-time errors in your code, they will be displayed in this window.

  7. Now you are ready to learn how to deploy a SheerPower program for distribution while protecting your source code in Part 3.

    Part 3: Deploy Programs >>>>>


Questions, comments and suggestions are welcome!



Copyright (c) 2003-2010 Touch Technologies, Inc. All rights reserved.
Parts of the SheerPower technology are U.S. patented and patent pending.