diff options
author | iArnold <arnoldvanh@gmail.com> | 2014-01-29 21:35:28 +0100 |
---|---|---|
committer | iArnold <arnoldvanh@gmail.com> | 2014-01-29 21:35:28 +0100 |
commit | ade0d072c00f68175dae50395e7d045e566c1a55 (patch) | |
tree | d99f93afbb1aeace320f11a27a90e6fea02f15f5 /red.html.markdown | |
parent | 9a4a3c084fe34dcade067a6b3582d43b850757dc (diff) |
Update red.html.markdown
Diffstat (limited to 'red.html.markdown')
-rw-r--r-- | red.html.markdown | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/red.html.markdown b/red.html.markdown index ceaaf80f..f277dd64 100644 --- a/red.html.markdown +++ b/red.html.markdown @@ -103,12 +103,12 @@ i1 / i2 ; result 0 (0.5, but truncated towards 0) ; 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 ; => false -3 != 2 ; => true -3 > 2 ; => true -3 < 2 ; => false -2 <= 2 ; => true -2 >= 2 ; => true +3 = 2 ; result false +3 != 2 ; result true +3 > 2 ; result true +3 < 2 ; result false +2 <= 2 ; result true +2 >= 2 ; result true ; ; Control Structures @@ -153,7 +153,7 @@ c: 5 until [ prin "o" c: c - 1 - c = 0 + c = 0 ; the condition to end the until loop ] ; will output: ooooo @@ -173,10 +173,7 @@ ooooo ; ; Functions ; -; In Red almost everything can be seen as a function. Even the IF returns a value. - -; Function declaration syntax: -; function-name: function [][] +; function example twice: function [a [integer!] /one return: [integer!]][ c: 2 a: a * c |