Errorcodes

When the compiler finds an error in the source code, it prints an error message. An error message looks like this, for example:

Typ Fehler (3001) in test.ddp (Z: 1, S: 16)

1 |  Die Zahl z ist "hallo".
  |                 ^^^^^^^

Ein Wert vom Typ Text kann keiner Variable vom Typ Zahl zugewiesen werden.

The first line contains:

Below that, the faulty line is shown. The ^ characters mark the exact position. At the end there is a description of the error.

Some messages are only warnings (Warnung). With a warning, the program is still compiled.

The first digit of the error code tells you the kind of error:

Error codesKindMeaning
0000Sonstiger Fehler (other error)Errors that don’t fit into any other category
1000 - 1999Syntax Fehler (syntax error)The source code is not structured correctly
2000 - 2999Semantischer Fehler (semantic error)The source code is structured correctly, but makes no sense
3000 - 3999Typ Fehler (type error)A value has the wrong type

List of Errorcodes

Other errors

CodeDescription
0000A module could not be included, for example because the file does not exist or two modules include each other

Syntax errors

CodeDescription
1000An unexpected word or character was found. Often a period or a comma is missing
1001A literal was expected, but an expression was found
1002A name was expected, for example a parameter name
1003A type name was expected
1004A capital letter was expected
1005A literal is malformed, for example because of an invalid escape sequence
1006The path of an include is malformed
1007An alias is malformed
1008The text is not valid UTF-8
1009The article or pronoun does not match the grammatical gender of the type, for example Der Zahl z ist 1.
1010The name of an overloaded operator is invalid

Semantic errors

CodeDescription
2000The name is already in use
2001The name has not been declared yet
2002The number of parameter names and parameter types of a function is different
2003No path to a .c, .lib, .a or .o file was given for an external function
2004A function was not declared in the global scope
2005A function is missing its return statement
2006An alias is faulty, for example because parameters are missing
2007The alias is already used by another function or combination
2008An alias from an included module already exists
2009A subsequent alias was not declared in the global scope
2010The arguments of a subsequent alias don’t match the function
2011A return statement is outside of a function
2012A function name was used instead of a variable name or vice versa
2013A non-global declaration was marked as public
2014A type was not declared in the global scope
2015A field does not exist in this combination
2016The word öffentlich (public) is missing or in the wrong place
2017Verlasse die Schleife or Fahre mit der Schleife fort is outside of a loop
2018A type is unknown or was not included
2019An external function was unnecessarily also marked as externally visible
2020The number of parameters does not match the overloaded operator
2021The operator is already overloaded for these parameter types
2022(Warning) A ... placeholder was found
2023A type cannot be defined as Variable
2024A function was declared with wird später definiert, but never defined
2025A function from another module was defined
2026A function was already defined
2027A generic function has no type parameter
2028A generic combination has no type parameter
2029A generic function was marked as externally visible
2030A generic function was declared without a definition
2031There were errors when creating a generic function for specific types
2032A non-generic type was used with type parameters
2033For an alias of a generic combination, not all type parameters could be found out
2034A value cannot be assigned to a constant

Type errors

CodeDescription
3000An operator or a function got a value of the wrong type
3001A value of the wrong type was assigned to a variable
3002An indexing is faulty, for example because the index is not a number
3003The values in a list literal don’t all have the same type
3004A type conversion with als is not possible
3005A reference parameter did not get a variable
3006A value cannot be passed as a reference, for example a letter in a text
3007The condition is not a Wahrheitswert
3008A value in a counting loop has the wrong type
3009The returned value does not match the return type of the function
3010The von operator was used with a value that is not a combination
3011A private field was used from another module
3012An overloaded operator returns nichts
3013A type parameter was given as a reference
3014The type of a generic field could not be found out
3015A generic type could not be created with the given types
3016A generic parameter of an external function is not a list or reference