From 57b0ac6412cec6bcd1dfa50acbfe08805cf9ad95 Mon Sep 17 00:00:00 2001 From: iArnold Date: Fri, 31 Jan 2014 20:44:43 +0100 Subject: Update red.html.markdown Updated document on two things the author of Red pointed out. --- red.html.markdown | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'red.html.markdown') diff --git a/red.html.markdown b/red.html.markdown index 73fe4bb0..9206f650 100644 --- a/red.html.markdown +++ b/red.html.markdown @@ -24,8 +24,9 @@ Ready to learn your first Red? ```Red All text before the header will be treated as comment, as long as you avoid using the word "red" -starting with a capital "R" in this pre-header text. Most of the time you start your script or program with -the header itself. The header of a red script is the capitalized word "red" followed by a +starting with a capital "R" in this pre-header text. This is a temporary shortcoming of the used lexer but +most of the time you start your script or program with the header itself. +The header of a red script is the capitalized word "red" followed by a whitespace character followed by a block of square brackets []. The block of brackets can be filled with useful information about the script or program: the author, the filename, the version, the license, what the program does or needs. @@ -122,12 +123,12 @@ i1 / i2 ; result 0 (0.5, but truncated towards 0) ; Control Structures ; ; if -; Execute a block of code if a given condition is true. IF does not return any value, +; Evaluate a block of code if a given condition is true. IF does not return any value, ; so cannot be used in an expression. if a < 0 [print "a is negative"] ; either -; Execute a block of code if a given condition is true, else execute an alternative block of code. +; Evaluate a block of code if a given condition is true, else evaluate an alternative block of code. ; If last expressions in both blocks have the same type, EITHER can be used inside an expression. either a < 0 [ either a = 0 [ @@ -165,10 +166,10 @@ until [ ] ; will output: ooooo -; Note that the loop will always be executed at least once, even if the condition is not met from the beginning. +; Note that the loop will always be evaluated at least once, even if the condition is not met from the beginning. ; while -; While a given condition is met, execute a block of code. WHILE does not return any value, +; While a given condition is met, evaluate a block of code. WHILE does not return any value, ; so cannot be used in an expression. c: 5 while [c > 0][ -- cgit v1.2.3