Tyl Programming Language
▶ CONDITIONAL STATEMENT - PART 2
It is possible to add a code block that will be executed if the condition is FALSE:
es_verdad ? print 'Si' \ print 'No'
The backslash: '\', stands for 'else', so the line: 'es_verdad ? print 'Si' \ print No', can be read as:
if es_verdad is true than print: 'Si', else print: 'No'
The backslash: '\', is replaced by: '╌', Tyl else symbol:
es_verdad ? print 'Si' print 'No'
If there are multiple statements in one of the yes or no blocks, the if statement will be like:
es_verdad ?
print 'Si'
print 'Es claro'

print 'No'
print 'Non Verdad'
The else symbol: '╌', must be in its own line, and it is the line that separates the yes and no code blocks.

So this code will print:
es_verdad

es_verdad ?
print 'Si'
print 'Es claro'

print 'No'
print 'Non Verdad'
Si
Es claro
And this:
es_verdad

es_verdad ?
print 'Si'
print 'Es claro'

print 'No'
print 'Non Verdad'
No
Non Verdad

If statement with yes block only structure:

[CONDITION] ?
 [STATEMENT]     yes block - statements
 [STATEMENT]     that will be executed
 [STATEMENT]     if the condition is true

If statement with yes and no blocks structure:

[CONDITION] ?
 [STATEMENT]     yes block - statements
 [STATEMENT]     that will be executed
 [STATEMENT]     if the condition is TRUE
 ╌
 [STATEMENT]     no block - statements
 [STATEMENT]     that will be executed
 [STATEMENT]     if the condition is FALSE


PART 1
PART 3