|
The Structure of a Sheerpower Program |
A Sheerpower program is made from simple, readable structural elements. Each element has a clear purpose, and together they make programs easier to write, test, debug, and maintain.
This tutorial gives a quick overview of the most important structural elements found in Sheerpower programs.
// or ! to explain
intent, assumptions, non-obvious logic, or other important details.
with and, when needed,
returning. Do not use call, and do not use
parentheses. A trailing comma indicates an implied line continuation.
$, Boolean variables end with
?, and numeric variables have no suffix.
end if, end select,
and end do.
%include to bring
shared source code into a program.
%include, %debug, and %todo
provide instructions to the compiler.
The structure of a Sheerpower program is intentionally simple. Programs are built from statements, comments, variables, built-in function calls, routine calls, code blocks, include files, compiler directives, and clear layout conventions.
Understanding these basic elements gives you a mental map for reading and writing Sheerpower code.
Below is a coding sandbox where you can enter, edit, and run
Sheerpower code. Type any Sheerpower code into the sandbox,
then choose Run to try it. Each tutorial includes
a sandbox.
|
Hide Description
|
|
|
Enter or modify the code below, and then click on RUN |
|
Looking for the full power of Sheerpower?
Check out the Sheerpower website. Free to download. Free to use. |