Built-In Constants

TMBASIC provides a set of constants for your convenience. You can use these constants in your programs by name rather than writing the literal number or string values.

Mathematical Constants

const PI = 3.141592653589793238462643383279502
const EULER = 2.718281828459045235360287471352662

Error Codes

Many built-in procedures throw errors when they fail. When catching errors, use the ErrorCode function to get the numeric error code. TMBASIC provides the following constants for the error codes used by built-in procedures.