Getting Started with SAPL

Learn how to install and run your first SAPL program

Installation

You can install SAPL from the this documantation site

sapl --version

For more detailed installation instructions, see the Installation Guide.

Your First SAPL Program

Let's create a simple "Hello, World!" program in SAPL. Create a file named hello.sapl with the following content:

# የመጀመሪያ ፕሮግራም

አሳይ("ሰላም ዓለም!")
SAPL

To run this program, use the SAPL interpreter:

sapl hello.sapl

You should see the output:

ሰላም ዓለም!

Using the SAPL REPL

SAPL comes with an interactive REPL (Read-Eval-Print Loop) that allows you to write and execute code line by line. To start the REPL, simply run:

sapl

You'll see a prompt where you can enter SAPL code:

>>> አሳይ("ሰላም ዓለም!")
ሰላም ዓለም!
>>> ቁጥር = 10
>>> ሌላ_ቁጥር = 5
>>> አሳይ(ቁጥር + ሌላ_ቁጥር)
15
SAPL

The REPL is a great way to experiment with SAPL and test small code snippets.

Next Steps

Now that you've installed SAPL and run your first program, you can: