File: if.html

package info (click to toggle)
drscheme 1%3A352-6
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 71,608 kB
  • ctags: 55,284
  • sloc: ansic: 278,966; cpp: 63,318; sh: 32,265; lisp: 14,530; asm: 7,327; makefile: 4,846; pascal: 4,363; perl: 2,920; java: 1,632; yacc: 755; lex: 258; sed: 93; xml: 12
file content (1 line) | stat: -rw-r--r-- 1,167 bytes parent folder | download | duplicates (2)
1
<html><head><title>if</title><h1>if</h1></head><body><code class="scheme">(<code class="scheme"><span class="keyword">if</span></code> <b>EXPRESSION</b> <b>EXPRESSION</b> <b>EXPRESSION</b>)</code><br /> The first expression (known as the "test" expression) is evaluated. If the expression evaluates to true, the result of the <code class="scheme"><span class="keyword">if</span></code> expression is the result of evaluating the second expression (often called the "then" clause). If the expression evaluates to false, the result of the if expression is the result of evaluating the third expression (known as the "else" clause). If the result of evaluating the test expression is neither true nor false, it is an error. <br /><br />Reductions:<br /><tt>(if true e_1 e_2)</tt><tt> --&gt; </tt><tt>e_1</tt><br /><tt>(if false e_1 e_2)</tt><tt> --&gt; </tt><tt>e_2</tt><br /><tt>(if v_1 e e)</tt><tt> e--&gt; </tt><font color="red"><tt>if: question result is not true or false</tt></font><br />&nbsp;&nbsp;&nbsp;where <tt>v_1</tt> is not <tt>false</tt>,  and <tt>v_1</tt> is not <tt>true</tt><br /><p><a href="index.htm">Beginning Student Language</a></p></body></html>