diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/checklistings/example.html')
-rw-r--r-- | Master/texmf-dist/doc/latex/checklistings/example.html | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/checklistings/example.html b/Master/texmf-dist/doc/latex/checklistings/example.html new file mode 100644 index 00000000000..5a78714da5a --- /dev/null +++ b/Master/texmf-dist/doc/latex/checklistings/example.html @@ -0,0 +1,74 @@ +<!DOCTYPE html> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<meta name="generator" content="hevea 2.16"> +<style type="text/css"> +.li-itemize{margin:1ex 0ex;} +.li-enumerate{margin:1ex 0ex;} +.dd-description{margin:0ex 0ex 1ex 4ex;} +.dt-description{margin:0ex;} +.toc{list-style:none;} +.footnotetext{margin:0ex; padding:0ex;} +div.footnotetext P{margin:0px; text-indent:1em;} +.thefootnotes{text-align:left;margin:0ex;} +.dt-thefootnotes{margin:0em;} +.dd-thefootnotes{margin:0em 0em 0em 2em;} +.footnoterule{margin:1em auto 1em 0px;width:50%;} +.caption{padding-left:2ex; padding-right:2ex; margin-left:auto; margin-right:auto} +.title{margin:2ex auto;text-align:center} +.titlemain{margin:1ex 2ex 2ex 1ex;} +.titlerest{margin:0ex 2ex;} +.center{text-align:center;margin-left:auto;margin-right:auto;} +.flushleft{text-align:left;margin-left:0ex;margin-right:auto;} +.flushright{text-align:right;margin-left:auto;margin-right:0ex;} +div table{margin-left:inherit;margin-right:inherit;margin-bottom:2px;margin-top:2px} +td table{margin:auto;} +table{border-collapse:collapse;} +td{padding:0;} +.cellpadding0 tr td{padding:0;} +.cellpadding1 tr td{padding:1px;} +pre{text-align:left;margin-left:0ex;margin-right:auto;} +blockquote{margin-left:4ex;margin-right:4ex;text-align:left;} +td p{margin:0px;} +.boxed{border:1px solid black} +.textboxed{border:1px solid black} +.vbar{border:none;width:2px;background-color:black;} +.hbar{border:none;height:2px;width:100%;background-color:black;} +.hfill{border:none;height:1px;width:200%;background-color:black;} +.vdisplay{border-collapse:separate;border-spacing:2px;width:auto; empty-cells:show; border:2px solid red;} +.vdcell{white-space:nowrap;padding:0px; border:2px solid green;} +.display{border-collapse:separate;border-spacing:2px;width:auto; border:none;} +.dcell{white-space:nowrap;padding:0px; border:none;} +.dcenter{margin:0ex auto;} +.vdcenter{border:solid #FF8000 2px; margin:0ex auto;} +.minipage{text-align:left; margin-left:0em; margin-right:auto;} +.marginpar{border:solid thin black; width:20%; text-align:left;} +.marginparleft{float:left; margin-left:0ex; margin-right:1ex;} +.marginparright{float:right; margin-left:1ex; margin-right:0ex;} +.theorem{text-align:left;margin:1ex auto 1ex 0ex;} +.part{margin:2ex auto;text-align:center} +.lstlisting{font-family:monospace;white-space:pre;margin-right:auto;margin-left:0pt;text-align:left} +.chklistingerr{font-style: italic; color: red;} +.chklistingmsg{font-style: italic;} +</style> +<title>example</title> +</head> +<body > +<!--HEVEA command line is: /usr/bin/hevea -fix example --> +<!--CUT STYLE article--><!--CUT DEF section 1 --><p>Two simple declarations: +</p><div class="lstlisting chklisting"><span style="font-family:sans-serif"><span style="font-weight:bold">let</span></span><span style="font-family:sans-serif"> </span><span style="font-family:sans-serif">x</span><span style="font-family:sans-serif"> = 3</span><span style="font-family:sans-serif"> +</span><span style="font-family:sans-serif"><span style="font-weight:bold">let</span></span><span style="font-family:sans-serif"> </span><span style="font-family:sans-serif">f</span><span style="font-family:sans-serif"> </span><span style="font-family:sans-serif">x</span><span style="font-family:sans-serif"> = </span><span style="font-family:sans-serif">x</span><span style="font-family:sans-serif"> + 1</span></div><p>and, after compilation with <em>ocamlc -i example.ml</em>, their types: +</p><div class="lstlisting chklistingmsg">val x : int +val f : int -> int</div><p>Then, building on these definitions: +</p><div class="lstlisting chklisting"><span style="font-family:sans-serif"><span style="font-weight:bold">let</span></span><span style="font-family:sans-serif"> </span><span style="font-family:sans-serif">y</span><span style="font-family:sans-serif"> = </span><span style="font-family:sans-serif">f</span><span style="font-family:sans-serif"> 3</span></div><div class="lstlisting chklistingmsg">val y : int</div><p>What about compiler error messages?: +</p><div class="lstlisting chklisting"><span style="font-family:sans-serif"><span style="font-weight:bold">let</span></span><span style="font-family:sans-serif"> </span><span style="font-family:sans-serif">z</span><span style="font-family:sans-serif"> = 3 + </span><span style="font-family:sans-serif"><span style="font-family:sans-serif">"four"</span></span></div><p>They are also detected: +</p><div class="lstlisting chklistingerr">File "example.ml", line 1, characters 12-18: +Error: This expression has type string but an expression was expected of type + int</div><p>We can continue on from earlier examples:</p><div class="lstlisting chklisting"><span style="font-family:sans-serif"><span style="font-weight:bold">let</span></span><span style="font-family:sans-serif"> </span><span style="font-family:sans-serif">z</span><span style="font-family:sans-serif"> = </span><span style="font-family:sans-serif">f</span><span style="font-family:sans-serif"> </span><span style="font-family:sans-serif">y</span></div><div class="lstlisting chklistingmsg">val z : int</div><!--CUT END --> +<!--HTMLFOOT--> +<!--ENDHTML--> +<!--FOOTER--> +<hr style="height:2"><blockquote class="quote"><em>This document was translated from L<sup>A</sup>T<sub>E</sub>X by +</em><a href="http://hevea.inria.fr/index.html"><em>H</em><em><span style="font-size:small"><sup>E</sup></span></em><em>V</em><em><span style="font-size:small"><sup>E</sup></span></em><em>A</em></a><em>.</em></blockquote></body> +</html> |