diff options
author | Peter Lewerin <peter.lewerin@tele2.se> | 2018-11-24 20:21:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-24 20:21:26 +0100 |
commit | 63ab96e72a704175133901657bfc52fb9b45d132 (patch) | |
tree | d4dacd7391129af85eaa8c2c098eba18e3505c70 /red.html.markdown | |
parent | b93ea7add75f774fd7d1f2b450a3517ea924bff4 (diff) |
Update red.html.markdown
The inequality operator was given as "!=", should be "<>".
The until construct was described as not returning a value: it always returns true if it finishes.
Diffstat (limited to 'red.html.markdown')
-rw-r--r-- | red.html.markdown | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/red.html.markdown b/red.html.markdown index 73baf462..9cf6c31d 100644 --- a/red.html.markdown +++ b/red.html.markdown @@ -114,12 +114,12 @@ i2 * i1 ; result 2 i1 / i2 ; result 0 (0.5, but truncated towards 0) ; Comparison operators are probably familiar, and unlike in other languages -; you only need a single '=' sign for comparison. +; you only need a single '=' sign for comparison. Inequality is '<>' like in Pascal. ; There is a boolean like type in Red. It has values true and false, but also ; the values on/off or yes/no can be used 3 = 2 ; result false -3 != 2 ; result true +3 <> 2 ; result true 3 > 2 ; result true 3 < 2 ; result false 2 <= 2 ; result true @@ -165,7 +165,7 @@ print ["a is " msg lf] ; until ; Loop over a block of code until the condition at end of block, is met. -; UNTIL does not return any value, so it cannot be used in an expression. +; UNTIL always returns the 'true' value from the final evaluation of the last expression. c: 5 until [ prin "o" |