The elements of the Maple language

The output file is a text file that includes a part or all program code. The program can consist of a single file, as well as several hundreds of source code files. Functions, variables, and constants are the main objects that make up the source program (source files).

Elements of the Maple language are basic constructs that are used when writing programs. These include: alphabet, identifiers, keywords, commentary, etc.

Alphabet - a set of characters that can be typed on the keyboard to create Maple language constructs.

The alphabet is used to form lexemes - the minimum lexical units that are recognized by the interpreter. These include keywords (reserved words), operations symbols, variable names, functions and commands, rows, numbers, delimiters. The Maple interpreter reads each line and divides it into tokens that run immediately.

The syntax is a set of rules for map objects mapping.

The Ukrainian alphabet can only be used in character strings, constants or in comments (in the explanations to the program).

The space characters are the space bar, the transition to a new line, the horizontal and vertical tabs, the new page. These symbols share tokens from each other.

The interpreter ignores several space characters in a row, which allows them to be used to improve the visuality of the program.

Separators are used by the interpreter for various tasks - from organizing the text of the program to instructing the compiler to perform specific actions:

,         coma (comma) - when transferring;

;         semicolon - ending the operator;

[]       square brackets (square brackets) - definition of the sequence (array);

{}       curly brackets - the definition of a plural;

()        parentheses - function definitions and others.

Constants are a number, a character, or a string of characters that does not change during the execution of the program. There are constants: goals; valid (with a floating point); symbolic; timely

Maple contains a number of named constants - those whose values can be accessed by name. Some of these constants cannot be changed. These include:

  • true, false - logical values "true" and "false";
  • infinity - infinity;
  • I - the imaginary unit;
  • Pi is a constant of 3.14159265.

Some constants can be overridden, for example, Digits, which specifies the number of significant digits for floating point numbers (default 10).

To view all constants in Maple, follow the command :? Ininame