Return to homepage

DOSATO

Copyright © 2024 Sebastiaan Heins

4.2 Errors 21-30

E21: E_INVALID_EXPRESSION

Invalid expression.

E22: E_EXPECTED_COLON_OPERATOR

Expected a colon operator. ':'.

E23: E_INVALID_TYPE

Invalid type cast.

make int a = (int long)0 // the type cast is invalid

E24: E_MUST_BE_GLOBAL

Defining a function, importing a library or including a source file must be done at the global scope.

do {
    include "file.to" // must be global
}

E25: E_CANT_RETURN_OUTSIDE_FUNCTION

Return statement must be inside a function.

return 0 // must be inside a function

E26: E_MASTER_CANT_HAVE_EXTENSIONS

Certain master keywords can not have extensions. (make, define, import, include)

make int a = 0 when (condition) // can not have extensions

E27: E_ELSE_WITHOUT_IF

Else statement without an if statement or when being used.

do sayln ("Hello") else sayln("Not allowed") // else being using without an if or a when

E28: E_EXPECTED_THEN

if expects a then statement.

do if (true) sayln("Error") // expected then after if

E29: E_BREAK_OUTSIDE_LOOP

Break statement must be inside a loop or switch case.

break // must be inside a loop

E30: E_CONTINUE_OUTSIDE_LOOP

Continue statement must be inside a loop.

continue // must be inside a loop