Skip to content
GETTING STARTED

Your first SS program.

Start with a complete example, learn how to check it, and then run it.

1. Choose how to follow along

Use SS Lab or an existing installation

If SS is already installed on your computer, the commands below use the ss launcher. Otherwise, open the example in SS Lab and run it privately in your browser.

2. Read the program

Complete executable V1 source from the authoritative language specification.

SS source
let forces = [10, 20, 30]
let area = 200

let total = (
    forces[0]
    + forces[1]
    + forces[2]
)

if total == 60 {
    printLine("Solved", total)
}

Expected output: Solved 60

Example source: Docs/SPECIFICATION.md, Language V1.Open in SS Lab

3. Check, then run

Check your program for errors before running it.

Check without running
SS source
ss check main.ss

A successful check confirms that SS understands the program. If there is a problem, the compiler explains where it occurred and how to correct it.

Run the program
SS source
ss run main.ss

This checks the program and then runs it. Building a standalone application is a separate step.

Evidence boundary

SS Lab uses the real SS compiler and runtime in your browser, so the language behaves the same way as a local SS installation.