Unfinished work on figures Data Types and Condition Types.
[clqr.git] / clqr-conditions-and-errors.mp
blob0e5ad66410027fa1b1364b9c0d3e3f47d3cc13c3
1 % Copyright (C) 2010 Bert Burgemeister
3 % Permission is granted to copy,distribute and/or modify this
4 % document under the terms of the GNU Free Documentation License,
5 % Version 1.2 or any later version published by the Free Software
6 % Foundation; with no Invariant Sections, no Front-Cover Texts and
7 % no Back-Cover Texts. For details see file COPYING.
9 prologues := 3;
10 input boxes
11 verbatimtex
12 \documentclass[8pt,pagesize,twoside,footexclude,headexclude]{scrartcl}
13 \input{clqr.packages}
14 \input{clqr.macros}
15 \begin{document}
16 etex
18 beginfig(1);
19   
20   boxit.t(btex \T etex);
21   drawboxed(t);
22   
23   boxjoin(a.s + (0,-3) = b.n);
24   boxit.condition(btex \kwd*{CONDITION} etex);
25   boxit.serious_condition(btex \kwd*{SERIOUS-CONDITION} etex);
26   t.se + (10,0) = condition.sw;
27   drawboxed(condition,serious_condition);
29   boxjoin(a.e + (30,0) = b.w);
30   boxit.simple_condition(btex \kwd*{SIMPLE-CONDITION} etex);
31   boxit.warning(btex \kwd*{WARNING} etex);
32   simple_condition.nw = (100,-50);
33   drawboxed(simple_condition,warning);
35   boxjoin(a.sw + (0,-3) = b.nw);
36   boxit.style_warning(btex \kwd*{STYLE-WARNING} etex);
37   warning.s + (0,-20) = style_warning.n;
38   drawboxed(style_warning);
40   boxjoin(a.sw + (0,-3) = b.nw);
41   boxit.simple_warning(btex \kwd*{SIMPLE-WARNING} etex);
42   warning.sw = simple_warning.nw;
43   drawboxed(simple_warning);
45   boxjoin(a.sw + (0,-3) = b.nw);
46   boxit.storage_condition(btex \kwd*{STORAGE-CONDITION} etex);
47   boxit.error(btex \kwd*{ERROR}\\ etex);
48   serious_condition.s + (0,-5) = storage_condition.n;
49   drawboxed(storage_condition,error);
51   boxjoin(a.sw + (0,-3) = b.nw);
52   boxit.simple_error(btex \kwd*{SIMPLE-ERROR} etex);
53   simple_condition.sw + (0, -10) = simple_error.nw;
54   drawboxed(simple_error);
56   boxjoin(a.sw + (0,-3) = b.nw);
57   boxit.type_error(btex \kwd*{TYPE-ERROR} etex);
58   boxit.program_error(btex \kwd*{PROGRAM-ERROR} etex);
59   boxit.control_error(btex \kwd*{CONTROL-ERROR} etex);
60   boxit.package_error(btex \kwd*{PACKAGE-ERROR} etex);
61   boxit.file_error(btex \kwd*{FILE-ERROR} etex);
62   boxit.stream_error(btex \kwd*{STREAM-ERROR} etex);
63   boxit.parse_error(btex \kwd*{PARSE-ERROR} etex);
64   boxit.cell_error(btex \kwd*{CELL-ERROR} etex);
65   boxit.print_not_readable(btex \kwd*{PRINT-NOT-READABLE} etex);
66   boxit.arithmetic_error(btex \kwd*{ARITHMETIC-ERROR} etex);
67   error.sw + (0, -5) = type_error.nw;
68   drawboxed(type_error,program_error,control_error,package_error,file_error,stream_error,parse_error,cell_error,print_not_readable,arithmetic_error);
70   boxjoin(a.sw + (0,-3) = b.nw);
71   boxit.simple_type_error(btex \kwd*{SIMPLE-TYPE-ERROR} etex);
72   simple_condition.sw + (0,-30) = simple_type_error.nw;
73   drawboxed(simple_type_error);
75   boxjoin(a.sw + (0,-3) = b.nw);
76   boxit.unbound_variable(btex  \kwd*{UNBOUND-VARIABLE} etex);
77   boxit.unbound_slot(btex  \kwd*{UNBOUND-SLOT} etex);
78   boxit.undefined_function(btex  \kwd*{UNDEFINED-FUNCTION} etex);
79   cell_error.e + (30,0) = unbound_variable.w;
80   drawboxed(unbound_variable,unbound_slot,undefined_function);                
81   
82   boxjoin(a.sw + (0,-3) = b.nw);
83   boxit.end_of_file(btex  \kwd*{END-OF-FILE} etex);
84   boxit.reader_error(btex \kwd*{READER-ERROR} etex);
85   stream_error.e + (30,0) = end_of_file.w;
86   drawboxed(end_of_file,reader_error);
88   boxjoin(a.sw + (0,-3) = b.nw);
89   boxit.division_by_zero(btex  \kwd*{DIVISION-BY-ZERO} etex);
90   boxit.floating_point_inexact(btex  \kwd*{FLOATING-POINT-INEXACT} etex);
91   boxit.floating_point_invalid_operation(btex  \kwd*{FLOATING-POINT-INVALID-OPERATION} etex);
92   boxit.floating_point_overflow(btex  \kwd*{FLOATING-POINT-OVERFLOW} etex);
93   boxit.floating_point_underflow(btex  \kwd*{FLOATING-POINT-UNDERFLOW} etex);
94   arithmetic_error.sw + (0,-3) = division_by_zero.nw;
95   drawboxed(division_by_zero,floating_point_inexact,floating_point_invalid_operation,floating_point_overflow,floating_point_underflow);
97   drawarrow t.e{right} .. condition.w{right};
98   
99   drawarrow condition.e{right} .. warning.n{down};
100   drawarrow condition.e{right} .. simple_condition.n{down};
101   drawarrow condition.w{left} .. serious_condition.w{right};
103   drawarrow warning.w{left} .. style_warning.w{right};
105   drawarrow serious_condition.w{left} .. storage_condition.w{right};
106   drawarrow serious_condition.w{left} .. error.w{right};
108   drawarrow error.w{left} .. parse_error.w{right};
109   drawarrow error.w{left} .. program_error.w{right};
110   drawarrow error.w{left} .. control_error.w{right};
111   drawarrow error.w{left} .. type_error.w{right};
112   drawarrow error.w{left} .. cell_error.w{right};
113   drawarrow error.w{left} .. stream_error.w{right};
114   drawarrow error.w{left} .. package_error.w{right};
115   drawarrow error.w{left} .. file_error.w{right};
116   drawarrow error.w{left} .. print_not_readable.w{right};
117   drawarrow error.w{left} .. arithmetic_error.w{right};
119   drawarrow stream_error.e{right} .. end_of_file.w{right};
121   drawarrow cell_error.e{right} .. unbound_variable.w{right};
122   drawarrow cell_error.e{right} .. unbound_slot.w{right};
123   drawarrow cell_error.e{right} .. undefined_function.w{right};
125   drawarrow arithmetic_error.w{left} .. division_by_zero.w{right};
126   drawarrow arithmetic_error.w{left} .. floating_point_inexact.w{right};
127   drawarrow arithmetic_error.w{left} .. floating_point_invalid_operation.w{right};
128   drawarrow arithmetic_error.w{left} .. floating_point_overflow.w{right};
129   drawarrow arithmetic_error.w{left} .. floating_point_underflow.w{right};
131   drawarrow stream_error.e{right} .. parse_error.e{down} .. reader_error.w{right} dashed evenly;
133   drawarrow warning.w{left} .. simple_condition.e{down} .. simple_warning.w{right} dashed evenly;
134   drawarrow error.e{right} .. simple_condition.s{right} .. simple_error.e{left} dashed evenly;
135   drawarrow type_error.e{right} .. simple_condition.w{down} .. simple_type_error.w{right} dashed evenly;
137 endfig;
139 verbatimtex
140 \end{document}
141 etex