From 3cc82e934e25a2ce578f9dec5cd6d3bff035753d Mon Sep 17 00:00:00 2001 From: pantor <1885260+pantor@users.noreply.github.com> Date: Fri, 1 Jan 2021 21:31:43 +0100 Subject: [PATCH] Improve conditions examples in readme --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b59ddcd..48e86c6 100644 --- a/README.md +++ b/README.md @@ -158,17 +158,17 @@ In a loop, the special variables `loop/index (number)`, `loop/index1 (number)`, Conditions support the typical if, else if and else statements. Following conditions are for example possible: ```.cpp -// Standard comparisons with variable -render("{% if time.hour >= 20 %}…{% else if time.hour >= 18 %}…{% endif %}", data); // True +// Standard comparisons with a variable +render("{% if time.hour >= 20 %}Serve{% else if time.hour >= 18 %}Make{% endif %} dinner.", data); // Serve dinner. // Variable in list -render("{% if neighbour in guests %}…{% endif %}", data); // True +render("{% if neighbour in guests %}Turn up the music!{% endif %}", data); // Turn up the music! // Logical operations -render("{% if guest_count < (3+2) and all_tired %}…{% else %}…{% endif %}", data); // True +render("{% if guest_count < (3+2) and all_tired %}Sleepy...{% else %}Keep going...{% endif %}", data); // Sleepy... // Negations -render("{% if not guest_count %}…{% endif %}", data); // True +render("{% if not guest_count %}The End{% endif %}", data); // The End ``` #### Includes