TYL PROGRAMMING LANGUAGE
▶ TYL COMPOUND STATEMENT STRUCTURE
To learn about statements in Tyl, see all variables, assignment, and other functionalities pages in the guide. Compound statements are proramming functionalities like: functions, conditionals and loopings. Here is a schematic description of compound statements in Tyl.
In this page we use this terminology:

There are two types of Tyl compound statement writing:
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 has a one-line-compound-statement 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 multi-line-compound-statement.

Usually, multi-line-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 multi-line-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:

[COMPOUND-STATEMENT-SIGNATURE] [SECOND-COMPOUND-STATEMENT-SIGNATURE] [ONE-LINE-CONTENT]


Multi-line compound statement structure:

[COMPOUND-STATEMENT-SIGNATURE]
 [CONTENT]
[END-STATEMENT]


Complex multi-line compound statement structure:

[COMPOUND-STATEMENT-SIGNATURE]
 [STATEMENT]
 ...

 [SECOND-COMPOUND-STATEMENT-SIGNATURE]
  [CONTENT]
 [END-STATEMENT]

 [STATEMENT]
 ...
[END-STATEMENT]