Sheerpower Logo

A.2  Who Uses SheerPower


SheerPower is designed for developers building and maintaining large-scale business applications. It provides high-level language features that support rapid development and efficient debugging, making it well-suited for developers who need to deliver reliable, high-performance business software.


One important feature is its status as a Memory Safe Language. SheerPower automatically handles memory management, eliminating concerns about memory leaks, buffer overflows, and manual allocation/deallocation. There is no garbage collection overhead, allowing developers to focus on application logic rather than memory management.

  1. Business Development Environment: SheerPower provides tools and constructs designed for business application development, enabling efficient translation of requirements into working code.
  2. 16-Digit Precision Math: SheerPower supports high-precision decimal arithmetic with its REAL data type, which provides 16 digits of decimal accuracy. This approach is designed to avoid the common rounding errors found in binary floating-point calculations. This level of precision is essential for financial applications where even minor rounding errors can cause significant problems.
  3. Integrated Database Engine: SheerPower includes a built-in database engine that handles data storage and retrieval without requiring external database setup or configuration.
  4. Business-Focused Language Constructs: SheerPower’s syntax and built-in functions are designed to simplify common business programming tasks.

In the tutorials, you will often encounter the PRINT statement. This is the main way to display output in SheerPower. You can print multiple items at once by separating them with a ;, which prevents spaces from being added between the items. For more advanced formatting, you can use the SPRINTF() function.


print 1.2 - 1.0 print 'a';'b';'c' print sprintf('%s is %r %p old.', "Sally", 10, "year")

SheerPower eliminates decimal rounding errors. Mathematical operations always produce accurate decimal results. For example:
print (0.1 + 0.2) - 0.3 0

In SheerPower, this code returns exactly 0, demonstrating accurate decimal arithmetic. In contrast, languages like C, C++, JavaScript, Java, and Python will return an approximate result, such as 5.551115123125783e-17, due to floating-point representation limitations.


Key Features for Business Applications

SheerPower includes features specifically designed for business applications, focusing on precision, performance, and developer productivity:

  1. 16-Digit Precision Math: SheerPower’s decimal arithmetic eliminates floating-point errors, providing reliable calculations for financial and business applications where accuracy is critical.
  2. Integrated Database Engine: The built-in database engine provides high-performance data operations with secure access and efficient storage, eliminating the need for external database configuration.
  3. Context-Aware Type Handling: SheerPower automatically handles type conversions for database operations while maintaining strict typing for variables, reducing manual conversion code.

    Note:
    In SheerPower, all variables are statically typed by default. Once you assign a type to a variable—like assigning a = 18 (which makes a a real)—you cannot later use that variable in a way that implies a different type, such as a + '9' (which treats a as a string). Doing so will result in a compile-time error.

    This strict type consistency helps catch bugs early and ensures predictable variable behavior.

    However, there is one exception: when accessing fields in a database table—such as payroll(salary) —because the field type is only known at runtime. This flexibility applies only to database table references, not to regular variables.
  4. Optimized Database Write Operations: SheerPower improves performance by batching and optimizing database write operations automatically.
  5. Custom Data Types with Formatting: Developers can define custom data types with predefined output formats, improving code readability and consistency.
  6. Suffix-Based Variable Types: SheerPower assigns variable types based on suffixes: $ for strings, % for integers, and ? for booleans. Variables without suffixes default to REAL type.
  7. Built-in SQL Injection Protection: SheerPower’s database operations use parameterized queries internally, preventing SQL injection attacks without requiring special coding practices from developers.

SheerPower’s PRINT statement provides flexible output options, with advanced formatting available through the SPRINTF() function.


In these tutorials, your code runs in a safe environment called a “sandbox.” The sandbox ensures security by restricting certain operations, such as file deletion or direct interaction with the operating system, to prevent unintended consequences. If your application requires these capabilities, you can work outside the sandbox in a full SheerPower environment.

Within the sandbox, some SheerPower features, like deleting files or executing OS-level commands, are inaccessible. If you attempt to use a restricted feature, you will receive a warning. Additionally, sandboxed programs are limited to a few seconds of execution time, and their output is capped at approximately 100KB.

Each tutorial includes action buttons:
  • Run Runs SheerPower sample code
  • Reset Resets sample code back to default
  • Clear Clears the sample code window
  • Home Goes to the tutorials homepage
  • Previous Goes back to the previous tutorial
  • Next Continues to the next tutorial

Under the buttons are four fill-in fields, one for each of the variables a$, b$, x, y. You can use these four variables in the sample code or make your own variables.
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.