A Guide to the Sheerpower Language

Previous Contents Index

Other Conventions

Other conventions used in this manual are:

[ ] Optional portions of a statement are enclosed in brackets:
 INPUT [PROMPT str_expr] : var

{ | } Braces combined with a vertical bar indicate that one of the elements in the braces must be chosen. The elements are separated by the vertical bar:

[ | ] Brackets combined with a vertical bar indicates that one of the options in the brackets can be used. The elements are separated by the vertical bar. Only one of the elements can be used:
 DO [WHILE expr | UNTIL expr]

... An ellipsis indicates that the language element can be repeated. An ellipsis following an option enclosed in brackets indicates that you can repeat the format of the whole option.
 INPUT [PROMPT str_expr] : var, var...

dashes Three sets of dashes indicate a block of code.

--- block of code
A vertical ellipsis indicates the continuation of a body of program code which is not a defined block of code.

1.11 Presentation of Command and Statement Information

Part of this chapter and several other chapters in this Guide describe the commands and statements in the Sheerpower language. The purpose of this section is to explain how the command and statement information is presented.

Statements that can only be used in connection with one another, such as if then or the select case statements, are described together. Each command and statement description includes the following information:


  input [options] var [, var...]                                


  extract structure struc_name: key field = expr1 [to expr2]    
    ---  block of code 
  end extract 

The FORMAT contains the command or statement format. This includes the required keywords and the optional elements, if there are any.

Keywords are words that must be typed exactly as shown in the format. Keywords inside the program examples are shown in bold; e.g., extract structure, key, to, end extract. The elements in regular text represent information that must be provided by the user in order to use the statement. For example, "struc_name" (the structure name) must be provided by the user in this statement. "field" and "expr1" information must also be provided.

Keywords and elements in brackets are optional. Multiple options are separated with commas.

Sheerpower is space sensitive, so spaces must be included where they are shown in the format. Either the single quote or double quote can be used as long as they are paired.


Example 1-5 Presentation of Command and Statement Information

  input 'Enter full name', timeout 30, elapsed x: name$ 
  print name$ 
  print 'Elapsed time: '; x 
Enter full name? TTI Tester   <---- type in your name here, then press the [Enter] key 
TTI Tester 
Elapsed time:  13 

The EXAMPLE shows how the command or statement is used. Wherever possible, the example is a full program rather than a program fragment.

You are encouraged to type in (or copy/paste) the Sheerpower examples into SPDEV throughout this manual and try running them.


In some cases, PURPOSE information is provided for usage clarity.


The DESCRIPTION tells about the command or statement, explains how it works, and other specific information.

1.12 Other Sheerpower Features

Chapter 6, Built-in Functions of this Guide provides information on Sheerpower's built-in functions, error and exception messages, and other general topics. You will want to get familiar with the built-in functions, as they will allow you to easily manipulate data.

Now that you have an idea of how to use this manual and work in Sheerpower,the remainder of this Guide will provide the information you need to create and use powerful and professional Sheerpower programs.

Chapter 2
Debugging and Experimenting in Sheerpower

This chapter describes Sheerpower's debug facilities and how to use them. It also describes the commands that can be used in the Sheerpower Console window for debugging and experimentation purposes.

To open the Sheerpower console, click once on the Console icon inside Sheerpower Rapid Development Environment (SPDEV) in the toolbar - the blue square with a yellow lightning bolt through it.

Using the Sheerpower Console

While writing a program in SPDEV, the Sheerpower console is used for debugging and experimentation purposes. The console is a limited editing environment.

2.1 Getting Help in the Sheerpower Console

You can get help from within the Sheerpower console by typing help and pressing the [Enter] key or by clicking on the ? icon in the toolbar. Selecting HELP in SPDEV or the console window will open up a new browser window that loads a local webpage containing links to this online documentation and other resources.

Console Display Default

By default, the Sheerpower Console does not open when you run a program in Sheerpower by double-clicking directly on the .SPSRC or .SPRUN file. The Console does open when you run a program by opening it up in SPDEV and clicking on the running man icon.

To display the Sheerpower Console when running an SPSRC or SPRUN program by double-clicking on the file, include a PRINT statement at the top of the program.

2.2 Sheerpower Commands and Statements

Sheerpower COMMANDS cause Sheerpower to take some action immediately. These Sheerpower commands are not normally used inside programs. Here is a list of Sheerpower commands that are generally used only in the console:

Sheerpower STATEMENTS are used inside Sheerpower program files (.SPSRC) in SPDEV.

When a Sheerpower statement is used inside the console, it becomes a COMMAND. For example, the PRINT statement becomes a command when used in the console. All Sheerpower statements are available to be used as commands while debugging inside the console window.

In the Sheerpower console, one or more commands can be performed at a time. Multiple commands must be separated by a backslash. If the line ends with a backslash, additional commands can be entered on the next line. The following example shows a single PRINT command inside the console.

To perform the following example, open the Sheerpower console by clicking on the console icon in the SPDEV toolbar. Inside the console window, type:

print 'Hi there!'

and press the [Enter] key.

Example 2-1 PRINT Command in the Console Window

print 'Hi there!'  //<--- your entry 
Hi there!  <--- result Sheerpower Console PRINT Command is Optional

The PRINT command in the Sheerpower console is optional.

While in the Sheerpower console, if you type in only the name of a variable and press [Enter], it will assume you want to print out the value of that variable. For example:

a$ = 'Hi there!' 
a$ // interpreted in the console as a print statement 
Hi there! <-- result 

You may also type in a '?' question mark in front of the variable and press [Enter]. The ? is translated in the Sheerpower console as the print command. For example:

?'Hi there!' 
Hi there! <-- result 

Therefore, the PRINT command is optional in the Sheerpower console. Entering Multiple Commands in the Sheerpower Console

You can enter multiple commands into the Sheerpower console window using the forward slash / symbol as a separator. This also works inside SPDEV. Type the example below into the console window as shown both ways:

Example 2-2 Multiple Commands in the Sheerpower Console

for i = 1 to 10\
print i\
next i 
1  //<--result 
for i = 1 to 10\print i\next i 
1  //<--result 

Here is another example you can try typing inside the console. Note that the date$ function will return the current date. This will be different than the date you see returned in this example.

Example 2-3 Print Date Command in the Sheerpower Console Window

    date$ //<--press [Enter]
20150511  //<--result 

Previous Next Contents Index