DOSATO

This is the homepage of the full Dosato documentation

Brief introduction to Dosato

Dosato is a high level, general purpose, interpreted programming language designed to be easy to use.
Dosato is built with user readability in mind, every line must start with one of the master keywords:

do
set
make
define
return
break
continue
import
include
switch
const

These keywords represent the core features of the programming language. These make spotting lines and visualising structures way easier.
This also means that the semicolon is not needed to end a line, allowing for semicolon-less code with full whitespace support.

Below is an example.

do say ("Hello world!") // do 
make int number = 5 // make 
set number = 10 // set
do: Calls a function or block

A function must start with the function name, followed by parentheses containing the arguments passed into the function.

make: creates a new variable (or function).

The variable is put on the stack. A type must be given, this is the type of the variable and it won't change.

set: sets a variable to a new value.

Variables retain their type.

define: defines a new function.

Functions must be defined before they are called.

return: returns a value from a function.

Functions must return a value of the same type as the function.

break: breaks out of a loop or switch case.

Breaks out of the current loop.

continue: continues to the next iteration of a loop.

Continues to the next iteration of the current loop.

import: imports a module.

Imports a cdosato module, written in C or other.

include: includes a file.

Includes a dosato source file in the current script.

Want to learn more?

Start here:

Section 1. Basics

  1. 1.1 Introduction
  2. 1.2 make and set
  3. 1.3 Variables and expressions
  4. 1.4 Conditionals
  5. 1.5 Functions
  6. 1.6 Extensions and Loops
  7. 1.7 Scopes
  8. 1.8 Arrays
  9. 1.9 Objects
  10. 1.10 Switch
  11. 1.11 Template Strings
  12. 1.12 Error Handling

Section 2. Specifications

  1. 2.0 Specifications
  2. 2.1 Types
  3. 2.2 Operators
  4. 2.3 do extensions
  5. 2.4 Type casting
  6. 2.5 Including and Importing

Section 3. Standard library

  1. 3.0 Standard library
  2. 3.1 Math
  3. 3.2 Strings
  4. 3.3 Arrays
  5. 3.4 IO
  6. 3.5 Time
  7. 3.6 Random
  8. 3.7 System

Section 4. Errors

  1. 4.0 Errors 1-10
  2. 4.1 Errors 11-20
  3. 4.2 Errors 21-30
  4. 4.3 Errors 31-40
  5. 4.4 Errors 41-50
  6. 4.5 Errors 51-60