TYL PROGRAMMING LANGUAGE
▶ TYL COMPOUND STATEMENT STRUCTURE
To learn about statements in Tyl, see all variables, assignments, and other Tyl entities pages in the guide. Compound statements are proramming functionalities like functions, conditionals and loopings. Here is a schematic description of compound statements in Tyl.
Terminology
one line
a section of (or all) line of code
statement
one line code that constructs a programming functionality
compound statement
one or more lines of code that construct a programming compound functionality
compound statement symbol
ASCII character, or UNICODE symbol, that represents a statement type
statement end symbol
caret character '^', or Tyl statement end symbol 'ᐤ'
end statement
the statement that is composed from statement end symbol only
compound statement signature
compound statement components according to its type, including its symbol
There are two types of Tyl compound statements:
If a compound statement is written in one line, it will be called one line compound statement. All compound functionalities that are written in one line of code are one line compound statement. Most of the programming functionalities in Tyl have a one line version.

A compound statement can contain statements, and that list of statements is called the compound statement content. If the compound statement can't be written in one line, or if we want to make the code look more spacious, than the compound statement will be a section of the code that spans over some contiguous lines of code, and it will be called multiline compound statement.

Typically, multiline compound statement will start with the compound statement signature section, that defines it.
The next lines, excluding the end statement line, are the content of the compound statement.
Any multiline compound statement must have a closing statement line, that is the end statement line, that denotes the end of the statement.


One line compound statement structure:
[COMPOUND STATEMENT SIGNATURE] [ONE LINE CONTENT]

Complex one line compound statement structure:
[FIRST COMPOUND STATEMENT SIGNATURE] [SECOND COMPOUND STATEMENT SIGNATURE] [ONE LINE CONTENT]

Multiline compound statement structure:
[COMPOUND STATEMENT SIGNATURE]
 [CONTENT]
[END STATEMENT]

Complex multiline compound statement structure:
[COMPOUND STATEMENT SIGNATURE]
 [STATEMENT]
 ...

 [CONTAINED COMPOUND STATEMENT SIGNATURE]
  [CONTENT]
 [END STATEMENT]

 [STATEMENT]
 ...

[END STATEMENT]