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.
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 Lab3. Check, then run
Check your program for errors before running it.
Check without running
ss check main.ssA 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 run main.ssThis 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.