From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001
From: Joseph Hunkeler <jhunkeler@gmail.com>
Date: Wed, 8 Jul 2015 20:46:52 -0400
Subject: Initial commit

---
 pkg/language/doc/if.hlp | 65 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 65 insertions(+)
 create mode 100644 pkg/language/doc/if.hlp

(limited to 'pkg/language/doc/if.hlp')

diff --git a/pkg/language/doc/if.hlp b/pkg/language/doc/if.hlp
new file mode 100644
index 00000000..eac7686f
--- /dev/null
+++ b/pkg/language/doc/if.hlp
@@ -0,0 +1,65 @@
+.help "if,else" Feb86 language
+.ih
+NAME
+if else -- conditional execution of a statement
+.ih
+SYNTAX
+\fIif\fR (expression) statement1 [\fIelse\fR statement2]
+.ih
+ELEMENTS
+.ls expression
+A boolean valued expression.
+.le
+.ls statement1, statement2
+The statements to be executed (possibly compound, i.e., enclosed in
+curly braces).
+.le
+.ih
+DESCRIPTION
+The \fIif\fR statement is used to execute a statement only if the
+specified condition is true.  An optional \fIelse\fR clause may be given
+to execute a different statement if the condition is false.
+.ih
+EXAMPLES
+1. Add X to Y only if X is less than Y.
+
+.nf
+	if (x < y)
+	    y += x
+.fi
+
+2. If X is less than 10 print "small", else print "big".
+
+.nf
+	if (x < 10)
+	    print ("small")
+	else
+	    print ("big")
+.fi
+
+3. The \fIelse if\fR construct.
+
+.nf
+	if (str == "+")
+	    val += x
+	else if (str == "-")
+	    val -= x
+	else if
+	    ...
+.fi
+
+4. Nesting, use of braces.
+
+.nf
+	if (i > 0) {
+	    if (i < 10) {
+		print ("0")
+		sum = sum * 10 + i
+	    } else
+		print (" ")
+	}
+.fi
+.ih
+SEE ALSO
+for, case, break, next
+.endhelp
-- 
cgit 

