Skip to content
OSL
LearnBuildPackagesReferencePlaygroundInstall
Install
Reference
Language
OverviewSyntaxTypesOperatorsBuilt-in functionsStringsArraysObjectsNumbers
Tools
Command lineOpalTesting referenceEditor supportDiagnostics
History
Legacy OSLDebug commandsPrototype helpersTypesLocal scoping

Reference

Look-up pages for the OSL language, its tools and its history: syntax, types, operators, built-ins, methods, the command line and more.

Pages for looking things up. Every entry has a short example you can edit and run. To learn the language in order, start with the course.

main.osl
log "Hello, OSL".toUpper()
log [3, 1, 2].sort()
log {a: 1} ++ {b: 2}
log 2 ^ 8
Click the code to edit it

Language#

Syntaxcomments, literals, declarations, every statement and keyword, reserved wordsTypesevery type, generics, conversions, typeof, assignabilityOperatorsevery operator with precedence and associativityBuilt-in functionscommands, global values and global functionsStringsevery string method and propertyArraysevery array method and propertyObjectsevery object and typed map methodNumbersevery int and number method, and the arithmetic rules

Tools#

Command lineosl run, compile, test, fmt, fix and the restOpalprojects, packages and opal.jsonTestingtest blocks and osl testEditor supportthe language server and editor setupDiagnosticserrors and warnings the compiler gives, and what they mean

History#

Legacy OSLhow the language changed, and what older code looks like
Next Syntax
Edit this page View as Markdown
On this page
LanguageToolsHistory
OSL

A readable language that compiles to native code. MIT licensed.

Learn

The courseProjectsPlayground

Docs

PackagesReferenceCommand line

Source

CompilerThis siteRotur