Implemented support for very long strings a la spss v13/v14
[pspp-builds.git] / tests / expressions / expressions.sh
1 #! /bin/sh
2
3 # Tests the expression optimizer and evaluator.
4
5 TEMPDIR=/tmp/pspp-tst-$$
6
7 # ensure that top_builddir  are absolute
8 if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
9 if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
10 top_builddir=`cd $top_builddir; pwd`
11 PSPP=$top_builddir/src/ui/terminal/pspp
12
13 # ensure that top_srcdir is absolute
14 top_srcdir=`cd $top_srcdir; pwd`
15
16 STAT_CONFIG_PATH=$top_srcdir/config
17 export STAT_CONFIG_PATH
18
19
20 cleanup()
21 {
22      cd /
23      rm -rf $TEMPDIR
24 }
25
26
27 fail()
28 {
29     echo $activity
30     echo FAILED
31     cleanup;
32     exit 1;
33 }
34
35
36 no_result()
37 {
38     echo $activity
39     echo NO RESULT;
40     cleanup;
41     exit 2;
42 }
43
44 pass()
45 {
46     cleanup;
47     exit 0;
48 }
49
50 mkdir -p $TEMPDIR
51
52 cd $TEMPDIR
53 activity="create expressions list"
54 sed -ne 's/#.*//;/^[    ]*$/!p' > $TEMPDIR/expr-list <<'EOF'
55
56 # Number syntax.
57 1e2 => 100.00
58 1e+2 => 100.00
59 1e-2 => 0.01
60 1e-99 => 0.00
61
62 # Test using numeric/string values as Booleans and vice-versa
63 0 AND 1 => false
64 $true AND 1 => true
65 1 OR $false => true
66 1 OR $sysmis => true
67 2 OR $sysmis => sysmis
68 2 AND $sysmis => false
69 'string' AND $sysmis => error
70 0 AND $sysmis => false
71 (1>2) + 1 => 1.00
72 $true + $false => 1.00
73
74 # Addition and subtraction.
75 1 + 2 => 3.00
76 1 + $true => 2.00
77 $sysmis + 1 => sysmis
78 7676 + $sysmis => sysmis
79 ('foo') + 5 => error
80 ('foo') + ('bar') => error      # Arithmetic concatenation requires CONCAT.
81 'foo' + 'bar' => "foobar"       # Lexical concatentation succeeds.
82 1 +3 - 2 +4 -5 => 1.00
83 1 - $true => 0.00
84 $true - 4/3 => -0.33
85 'string' - 1e10 => error
86 9.5 - '' => error
87 1 - 2 => -1.00
88 52 -23 => 29.00 
89
90 # Multiplication and division
91 5 * 10 => 50.00
92 10 * $true => 10.00
93 $true * 5 => 5.00
94 1.5 * $true => 1.50
95 5 * $sysmis => sysmis
96 $sysmis * 15 => sysmis
97 2 * 5 / 10 => 1.00
98 1 / 2 => 0.50
99 2 / 5 => 0.40
100 12 / 3 / 2 => 2.00
101
102 # Exponentiation.
103 2**8 => 256.00
104 (2**3)**4 => 4096.00    # Irritating, but compatible.
105 2**3**4 => 4096.00
106
107 # Unary minus.
108 2+-3 => -1.00
109 2*-3 => -6.00
110 -3**2 => -9.00
111 (-3)**2 => 9.00
112 2**-1 => 0.50
113 0**0 => sysmis
114 0**-1 => sysmis
115 (-3)**1.5 => sysmis
116
117 # AND truth table.
118 $false AND $false => false
119 $false AND $true => false
120 $false AND $sysmis => false
121 $true AND $false => false
122 $true AND $true => true
123 $true AND $sysmis => sysmis
124 $sysmis AND $false => false
125 $sysmis AND $true => sysmis
126 $sysmis AND $sysmis => sysmis
127 $false & $false => false
128 $false & $true => false
129 $false & $sysmis => false
130 $true & $false => false
131 $true & $true => true
132 $true & $sysmis => sysmis
133 $sysmis & $false => false
134 $sysmis & $true => sysmis
135 $sysmis & $sysmis => sysmis
136
137 # OR truth table.
138 $false OR $false => false
139 $false OR $true => true
140 $false OR $sysmis => sysmis
141 $true OR $false => true
142 $true OR $true => true
143 $true OR $sysmis => true
144 $sysmis OR $false => sysmis
145 $sysmis OR $true => true
146 $sysmis OR $sysmis => sysmis
147 $false | $false => false
148 $false | $true => true
149 $false | $sysmis => sysmis
150 $true | $false => true
151 $true | $true => true
152 $true | $sysmis => true
153 $sysmis | $false => sysmis
154 $sysmis | $true => true
155 $sysmis | $sysmis => sysmis
156
157 # NOT truth table.
158 not $false => true
159 not 0 => true
160 not 2.5 => true
161 not $true => false
162 not 1 => false
163 not $sysmis => sysmis
164 ~ $false => true
165 ~ 0 => true
166 ~ 2.5 => true
167 ~ $true => false
168 ~ 1 => false
169 ~ $sysmis => sysmis
170
171 # Relational operators.
172 1 eq 1 => true
173 1 = 1 => true
174 1 eq 2 => false
175 2 = 3 => false
176 1 eq 'foobar' => error
177 5 eq 'foobar' => error
178 'baz' = 10 => error
179 'quux' = 5.55 => error
180 'foobar' = 'foobar' => true
181 'quux' = 'bar' => false
182 'bar   ' = 'bar' => true
183 'asdf         ' = 'asdf  ' => true
184 'asdfj   ' = 'asdf' => false
185 1 + 2 = 3 => true               # Check precedence.
186 1 >= 2 = 2 ge 3 => false        # Check precedence.
187 3 ne 2 ~= 1 => false            # Mathematically true.
188 3 > 2 > 1 => false              # Mathematically true.
189
190 1 <= 2 => true
191 2.5 <= 1.5 => false
192 1 le 2 => true
193 2 <= 2 => true
194 2 le 2 => true
195 2 < = 2 => error        # Make sure <= token can't be split.
196 1 <= 'foobar' => error
197 5 <= 'foobar' => error
198 'baz' <= 10 => error
199 'quux' <= 5.55 => error
200 '0123' <= '0123' => true
201 '0123' <= '0124' => true
202 '0124' le '0123' => false
203 '0123  ' <= '0123' => true
204 '0123' le '0123  ' => true
205
206 1 < 2 => true
207 2.5 < 1.5 => false
208 3.5 lt 4 => true
209 4 lt 3.5 => false
210 1 lt 'foobar' => error
211 5 lt 'foobar' => error
212 'baz' < 10 => error
213 'quux' < 5.55 => error
214 '0123' lt '0123' => false
215 '0123' < '0124' => true
216 '0124' lt '0123' => false
217 '0123  ' < '0123' => false
218 '0123' lt '0123  ' => false
219
220 1 >= 2 => false
221 2.5 >= 1.5 => true
222 1 ge 2 => false
223 2 >= 2 => true
224 2 ge 2 => true
225 2 > = 2 => error        # Make sure >= token can't be split.
226 1 >= 'foobar' => error
227 5 ge 'foobar' => error
228 'baz' ge 10 => error
229 'quux' >= 5.55 => error
230 '0123' ge '0123' => true
231 '0123' >= '0124' => false
232 '0124' >= '0123' => true
233 '0123  ' ge '0123' => true
234 '0123' >= '0123  ' => true
235
236 1 > 2 => false
237 2.5 > 1.5 => true
238 3.5 gt 4 => false
239 4 gt 3.5 => true
240 1 gt 'foobar' => error
241 5 gt 'foobar' => error
242 'baz' > 10 => error
243 'quux' > 5.55 => error
244 '0123' gt '0123' => false
245 '0123' > '0124' => false
246 '0124' gt '0123' => true
247 '0123  ' > '0123' => false
248 '0123' gt '0123  ' => false
249
250 1 ne 1 => false
251 1 ~= 1 => false
252 1 <> 2 => true
253 2 ne 3 => true
254 1 ~= 'foobar' => error
255 5 <> 'foobar' => error
256 'baz' ne 10 => error
257 'quux' ~= 5.55 => error
258 'foobar' <> 'foobar' => false
259 'quux' ne 'bar' => true
260 'bar   ' <> 'bar' => false
261 'asdf         ' ~= 'asdf  ' => false
262 'asdfj   ' ne 'asdf' => true
263 1 < > 1 => error        # <> token can't be split
264 1 ~ = 1 => error        # ~= token can't be split
265
266 exp(10) => 22026.47
267 exp('x') => error
268
269 lg10(500) => 2.70
270 lg10('x') => error
271
272 ln(10) => 2.30
273 ln('x') => error
274
275 sqrt(500) => 22.36
276 sqrt('x') => error
277
278 abs(-10.5) => 10.50
279 abs(-55.79) => 55.79
280 abs(22) => 22.00
281 abs(0) => 0.00
282
283 mod(55.5, 2) => 1.50
284 mod(-55.5, 2) => -1.50
285 mod(55.5, -2) => 1.50
286 mod(-55.5, -2) => -1.50
287 mod('a', 2) => error
288 mod(2, 'a') => error
289 mod('a', 'b') => error
290
291 mod10(55.5) => 5.50
292 mod10(-55.5) => -5.50
293 mod10('x') => error
294
295 rnd(5.4) => 5.00
296 rnd(5.6) => 6.00
297 rnd(-5.4) => -5.00
298 rnd(-5.6) => -6.00
299 rnd('x') => error
300
301 trunc(1.2) => 1.00
302 trunc(1.9) => 1.00
303 trunc(-1.2) => -1.00
304 trunc(-1.9) => -1.00
305 trunc('x') => error
306
307 acos(.5) / 3.14159 * 180 => 60.00
308 arcos(.75) / 3.14159 * 180 => 41.41
309 arcos(-.5) / 3.14159 * 180 => 120.00
310 acos(-.75) / 3.14159 * 180 => 138.59
311 acos(-1) / 3.14159 * 180 => 180.00
312 arcos(1) / 3.14159 * 180 => 0.00
313 acos(-1.01) => sysmis
314 arcos(1.01) => sysmis
315 acos('x') => error
316
317 arsin(.5) / 3.14159 * 180 => 30.00
318 asin(.25) / 3.14159 * 180 => 14.48
319 arsin(-.5) / 3.14159 * 180 => -30.00
320 asin(-.25) / 3.14159 * 180 => -14.48
321 arsin(-1.01) => sysmis
322 asin(1.01) => sysmis
323 arsin('x') => error
324
325 artan(1) / 3.14159 * 180 => 45.00
326 atan(10) / 3.14159 * 180 => 84.29
327 artan(-1) / 3.14159 * 180 => -45.00
328 atan(-10) / 3.14159 * 180 => -84.29
329 artan('x') => error
330
331 cos(60 / 180 * 3.14159) => 0.50
332 cos(45 / 180 * 3.14159) => 0.71
333 cos(30 / 180 * 3.14159) => 0.87
334 cos(15 / 180 * 3.14159) => 0.97
335 cos(-60 / 180 * 3.14159) => 0.50
336 cos(-45 / 180 * 3.14159) => 0.71
337 cos(-30 / 180 * 3.14159) => 0.87
338 cos(-15 / 180 * 3.14159) => 0.97
339 cos(123 / 180 * 3.14159) => -0.54
340 cos(321 / 180 * 3.14159) => 0.78
341 cos('x') => error
342
343 sin(60 / 180 * 3.14159) => 0.87
344 sin(45 / 180 * 3.14159) => 0.71
345 sin(30 / 180 * 3.14159) => 0.50
346 sin(15 / 180 * 3.14159) => 0.26
347 sin(-60 / 180 * 3.14159) => -0.87
348 sin(-45 / 180 * 3.14159) => -0.71
349 sin(-30 / 180 * 3.14159) => -0.50
350 sin(-15 / 180 * 3.14159) => -0.26
351 sin(123 / 180 * 3.14159) => 0.84
352 sin(321 / 180 * 3.14159) => -0.63
353 sin('x') => error
354
355 tan(60 / 180 * 3.14159) => 1.73
356 tan(45 / 180 * 3.14159) => 1.00
357 tan(30 / 180 * 3.14159) => 0.58
358 tan(15 / 180 * 3.14159) => 0.27
359 tan(-60 / 180 * 3.14159) => -1.73
360 tan(-45 / 180 * 3.14159) => -1.00
361 tan(-30 / 180 * 3.14159) => -0.58
362 tan(-15 / 180 * 3.14159) => -0.27
363 tan(123 / 180 * 3.14159) => -1.54
364 tan(321 / 180 * 3.14159) => -0.81
365 tan('x') => error
366
367 # FIXME: a variable name as the argument to SYSMIS is a special case
368 # that we don't yet test.  We also can't test VALUE this way.
369 missing(10) => false
370 missing($sysmis) => true
371 missing(asin(1.01)) => true
372 missing(asin(.5)) => false
373 missing('    ') => error
374 nmiss($sysmis) => 1.00
375 nmiss(0) => 0.00
376 nmiss($sysmis, $sysmis, $sysmis) => 3.00
377 nmiss(1, 2, 3, 4) => 0.00
378 nmiss(1, $sysmis, $sysmis, 2, 2, $sysmis, $sysmis, 3, 4) => 4.00
379 nvalid($sysmis) => 0.00
380 nvalid(0) => 1.00
381 nvalid($sysmis, $sysmis, $sysmis) => 0.00
382 nvalid(1, 2, 3, 4) => 4.00
383 nvalid(1, $sysmis, $sysmis, 2, 2, $sysmis, $sysmis, 3, 4) => 5.00
384 sysmis(10) => false
385 sysmis($sysmis) => true
386 sysmis(asin(1.01)) => true
387 sysmis(asin(.5)) => false
388 sysmis('    ') => error
389
390 any($sysmis, 1, $sysmis, 3) => sysmis
391 any(1, 1, 2, 3) => true
392 any(1, $true, 2, 3) => true
393 any(1, $false, 2, 3) => false
394 any(2, 1, 2, 3) => true
395 any(3, 1, 2, 3) => true
396 any(5, 1, 2, 3) => false
397 any(1, 1, 1, 1) => true
398 any($sysmis, 1, 1, 1) => sysmis
399 any(1, $sysmis, $sysmis, $sysmis) => sysmis
400 any($sysmis, $sysmis, $sysmis, $sysmis) => sysmis
401 any(1) => error
402 any('1', 2, 3, 4) => error
403 any(1, '2', 3, 4) => error
404 any(1, 2, '3', 4) => error
405 any(1, 2, 3, '4') => error
406
407 any('', 'a', '', 'c') => true
408 any('a', 'a', 'b', 'c') => true
409 any('b', 'a', 'b', 'c') => true
410 any('c', 'a', 'b', 'c') => true
411 any('e', 'a', 'b', 'c') => false
412 any('a', 'a', 'a', 'a') => true
413 any('', 'a', 'a', 'a') => false
414 any('a', '', '', '') => false
415 any('a') => error
416 any('a', 'a  ', 'b', 'c') => true
417 any('b   ', 'a', 'b', 'c') => true
418 any('c   ', 'a', 'b', 'c     ') => true
419 any(a, 'b', 'c', 'd') => error
420 any('a', b, 'c', 'd') => error
421 any('a', 'b', c, 'd') => error
422 any('a', 'b', 'c', d) => error
423
424 range(5, 1, 10) => true
425 range(1, 1, 10) => true
426 range(10, 1, 10) => true
427 range(-1, 1, 10) => false
428 range(12, 1, 10) => false
429 range($sysmis, 1, 10) => sysmis
430 range(5, 1, $sysmis) => sysmis
431 range(5, $sysmis, 10) => sysmis
432 range($sysmis, $sysmis, 10) => sysmis 
433 range($sysmis, 1, $sysmis) => sysmis
434 range($sysmis, $sysmis, $sysmis) => sysmis
435 range(0, 1, 8, 10, 18) => false
436 range(1, 1, 8, 10, 18) => true
437 range(6, 1, 8, 10, 18) => true
438 range(8, 1, 8, 10, 18) => true
439 range(9, 1, 8, 10, 18) => false
440 range(10, 1, 8, 10, 18) => true
441 range(13, 1, 8, 10, 18) => true
442 range(16, 1, 8, 10, 18) => true
443 range(18, 1, 8, 10, 18) => true
444 range(20, 1, 8, 10, 18) => false
445 range(1) => error
446 range(1, 2) => error
447 range(1, 2, 3, 4) => error
448 range(1, 2, 3, 4, 5, 6) => error
449 range('1', 2, 3) => error
450 range(1, '2', 3) => error
451 range(1, 2, '3') => error
452
453 range('123', '111', '888') => true
454 range('111', '111', '888') => true
455 range('888', '111', '888') => true
456 range('110', '111', '888') => false
457 range('889', '111', '888') => false
458 range('000', '111', '888') => false
459 range('999', '111', '888') => false
460 range('123   ', '111', '888') => true
461 range('123', '111   ', '888') => true
462 range('123', '111', '888   ') => true
463 range('123', '111    ', '888   ') => true
464 range('00', '01', '08', '10', '18') => false
465 range('01', '01', '08', '10', '18') => true
466 range('06', '01', '08', '10', '18') => true
467 range('08', '01', '08', '10', '18') => true
468 range('09', '01', '08', '10', '18') => false
469 range('10', '01', '08', '10', '18') => true
470 range('15', '01', '08', '10', '18') => true
471 range('18', '01', '08', '10', '18') => true
472 range('19', '01', '08', '10', '18') => false
473 range('1') => error
474 range('1', '2') => error
475 range('1', '2', '3', '4') => error
476 range('1', '2', '3', '4', '5', '6') => error
477 range(1, '2', '3') => error
478 range('1', 2, '3') => error
479 range('1', '2', 3) => error
480
481 cfvar(1, 2, 3, 4, 5) => 0.53
482 cfvar(1, $sysmis, 2, 3, $sysmis, 4, 5) => 0.53
483 cfvar(1, 2) => 0.47
484 cfvar(1) => error
485 cfvar(1, $sysmis) => sysmis
486 cfvar(1, 2, 3, $sysmis) => 0.50
487 cfvar.4(1, 2, 3, $sysmis) => sysmis
488 cfvar.4(1, 2, 3) => error
489 cfvar('x') => error
490 cfvar('x', 1, 2, 3) => error
491
492 max(1, 2, 3, 4, 5) => 5.00
493 max(1, $sysmis, 2, 3, $sysmis, 4, 5) => 5.00
494 max(1, 2) => 2.00
495 max() => error
496 max(1) => 1.00
497 max(1, $sysmis) => 1.00
498 max(1, 2, 3, $sysmis) => 3.00
499 max.4(1, 2, 3, $sysmis) => sysmis
500 max.4(1, 2, 3) => error
501
502 max("2", "3", "5", "1", "4") => "5"
503 max("1", "2") => "2"
504 max("1") => "1"
505
506 mean(1, 2, 3, 4, 5) => 3.00
507 mean(1, $sysmis, 2, 3, $sysmis, 4, 5) => 3.00
508 mean(1, 2) => 1.50
509 mean() => error
510 mean(1) => 1.00
511 mean(1, $sysmis) => 1.00
512 mean(1, 2, 3, $sysmis) => 2.00
513 mean.4(1, 2, 3, $sysmis) => sysmis
514 mean.4(1, 2, 3) => error
515
516 min(1, 2, 3, 4, 5) => 1.00
517 min(1, $sysmis, 2, 3, $sysmis, 4, 5) => 1.00
518 min(1, 2) => 1.00
519 min() => error
520 min(1) => 1.00
521 min(1, $sysmis) => 1.00
522 min(1, 2, 3, $sysmis) => 1.00
523 min.4(1, 2, 3, $sysmis) => sysmis
524 min.4(1, 2, 3) => error
525
526 min("2", "3", "5", "1", "4") => "1"
527 min("1", "2") => "1"
528 min("1") => "1"
529
530 sd(1, 2, 3, 4, 5) => 1.58
531 sd(1, $sysmis, 2, 3, $sysmis, 4, 5) => 1.58
532 sd(1, 2) => 0.71
533 sd(1) => error
534 sd(1, $sysmis) => sysmis
535 sd(1, 2, 3, $sysmis) => 1.00
536 sd.4(1, 2, 3, $sysmis) => sysmis
537 sd.4(1, 2, 3) => error
538 sd('x') => error
539 sd('x', 1, 2, 3) => error
540
541 sum(1, 2, 3, 4, 5) => 15.00
542 sum(1, $sysmis, 2, 3, $sysmis, 4, 5) => 15.00
543 sum(1, 2) => 3.00
544 sum() => error
545 sum(1) => 1.00
546 sum(1, $sysmis) => 1.00
547 sum(1, 2, 3, $sysmis) => 6.00
548 sum.4(1, 2, 3, $sysmis) => sysmis
549 sum.4(1, 2, 3) => error
550
551 variance(1, 2, 3, 4, 5) => 2.50
552 variance(1, $sysmis, 2, 3, $sysmis, 4, 5) => 2.50
553 variance(1, 2) => 0.50
554 variance(1) => error
555 variance(1, $sysmis) => sysmis
556 variance(1, 2, 3, $sysmis) => 1.00
557 variance.4(1, 2, 3, $sysmis) => sysmis
558 variance.4(1, 2, 3) => error
559 variance('x') => error
560 variance('x', 1, 2, 3) => error
561
562 concat('') => ""
563 concat('a', 'b') => "ab"
564 concat('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h') => "abcdefgh"
565 concat('abcdefgh', 'ijklmnopq') => "abcdefghijklmnopq"
566 concat('a', 1) => error
567 concat(1, 2) => error
568
569 index('abcbcde', 'bc') => 2.00
570 index('abcbcde', 'bcd') => 4.00
571 index('abcbcde', 'bcbc') => 2.00
572 index('abcdefgh', 'abc') => 1.00
573 index('abcdefgh', 'bcd') => 2.00
574 index('abcdefgh', 'cde') => 3.00
575 index('abcdefgh', 'def') => 4.00
576 index('abcdefgh', 'efg') => 5.00
577 index('abcdefgh', 'fgh') => 6.00
578 index('abcdefgh', 'fghi') => 0.00
579 index('abcdefgh', 'x') => 0.00
580 index('abcdefgh', 'abch') => 0.00
581 index('banana', 'na') => 3.00
582 index('banana', 'ana') => 2.00
583 index('', 'x') => 0.00
584 index('', '') => sysmis
585 index('abcdefgh', '') => sysmis
586 index('abcdefgh', 'alkjsfdjlskalkjfa') => 0.00
587
588 index('abcbcde', 'bc', 1) => 2.00
589 index('abcbcde', 'dc', 1) => 3.00
590 index('abcbcde', 'abc', 1) => 1.00
591 index('abcbcde', 'bc', 2) => 2.00
592 index('abcbcde', 'dc', 2) => 0.00
593 index('abcbcde', 'abc', 1) => 1.00
594 index('abcbcde', 'bccb', 2) => 2.00
595 index('abcbcde', 'bcbc', 2) => 2.00
596 index('abcbcde', 'bcbc', $sysmis) => sysmis
597
598 rindex('abcbcde', 'bc') => 4.00
599 rindex('abcbcde', 'bcd') => 4.00
600 rindex('abcbcde', 'bcbc') => 2.00
601 rindex('abcdefgh', 'abc') => 1.00
602 rindex('abcdefgh', 'bcd') => 2.00
603 rindex('abcdefgh', 'cde') => 3.00
604 rindex('abcdefgh', 'def') => 4.00
605 rindex('abcdefgh', 'efg') => 5.00
606 rindex('abcdefgh', 'fgh') => 6.00
607 rindex('abcdefgh', 'fghi') => 0.00
608 rindex('abcdefgh', 'x') => 0.00
609 rindex('abcdefgh', 'abch') => 0.00
610 rindex('banana', 'na') => 5.00
611 rindex('banana', 'ana') => 4.00
612 rindex('', 'x') => 0.00
613 rindex('', '') => sysmis
614 rindex('abcdefgh', '') => sysmis
615 rindex('abcdefgh', 'alkjsfdjlskalkjfa') => 0.00
616
617 rindex('abcbcde', 'bc', 1) => 5.00
618 rindex('abcbcde', 'dc', 1) => 6.00
619 rindex('abcbcde', 'abc', 1) => 5.00
620 rindex('abcbcde', 'bc', 2) => 4.00
621 rindex('abcbcde', 'dc', 2) => 0.00
622 rindex('abcbcde', 'abc', 1) => 5.00
623 rindex('abcbcde', 'bccb', 2) => 4.00
624 rindex('abcbcde', 'bcbc', 2) => 4.00
625 rindex('abcbcde', 'bcbc', $sysmis) => sysmis
626 rindex('abcbcde', 'bcbcg', 2) => sysmis
627 rindex('abcbcde', 'bcbcg', $sysmis) => sysmis
628 rindex('abcbcde', 'bcbcg', 'x') => error
629 rindex(1, 'bcdfkjl', 2) => error
630 rindex('aksj', 2, 2) => error
631 rindex(1, 2, 3) => error
632 rindex(1, 2, '3') => error
633
634 length('') => 0.00
635 length('a') => 1.00
636 length('xy') => 2.00
637 length('adsf    ') => 8.00
638 length('abcdefghijkl') => 12.00
639 length(0) => error
640 length($sysmis) => error
641
642 lower('ABCDEFGHIJKLMNOPQRSTUVWXYZ!@%&*(089') => "abcdefghijklmnopqrstuvwxyz!@%&*(089"
643 lower('') => ""
644 lower(1) => error
645
646 lpad('abc', -1) => ""
647 lpad('abc', 0) => "abc"
648 lpad('abc', 2) => "abc"
649 lpad('abc', 3) => "abc"
650 lpad('abc', 10) => "       abc"
651 lpad('abc', 32768) => ""
652 lpad('abc', $sysmis) => ""
653 lpad('abc', -1, '*') => ""
654 lpad('abc', 0, '*') => "abc"
655 lpad('abc', 2, '*') => "abc"
656 lpad('abc', 3, '*') => "abc"
657 lpad('abc', 10, '*') => "*******abc"
658 lpad('abc', 32768, '*') => ""
659 lpad('abc', $sysmis, '*') => ""
660 lpad('abc', $sysmis, '') => ""
661 lpad('abc', $sysmis, 'xy') => ""
662 lpad(0, 10) => error
663 lpad('abc', 'def') => error
664 lpad(0, 10, ' ') => error
665 lpad('abc', 'def', ' ') => error
666 lpad('x', 5, 0) => error
667 lpad('x', 5, 2) => error
668
669 number("123", f3.0) => 123.00
670 number(" 123", f3.0) => 12.00
671 number("123", f3.1) => 12.30
672 number("   ", f3.1) => sysmis
673 number("123", a8) => error
674 number("123", cca1.2) => error  # CCA is not an input format
675
676 ltrim('   abc') => "abc"
677 rtrim('   abc   ') => "   abc"
678 ltrim('abc') => "abc"
679 ltrim(' abc') => "      abc"
680 ltrim('    ') => ""
681 ltrim('') => ""
682 ltrim(8) => error
683 ltrim('***abc', '*') => "abc"
684 ltrim('abc', '*') => "abc"
685 ltrim('*abc', '*') => "abc"
686 ltrim('', '*') => ""
687 ltrim(8, '*') => error
688 ltrim(' x', 8) => error
689 ltrim(8, 9) => error
690
691 rpad('abc', -1) => ""
692 rpad('abc', 0) => "abc"
693 rpad('abc', 2) => "abc"
694 rpad('abc', 3) => "abc"
695 rpad('abc', 10) => "abc       "
696 rpad('abc', 32768) => ""
697 rpad('abc', $sysmis) => ""
698 rpad('abc', -1, '*') => ""
699 rpad('abc', 0, '*') => "abc"
700 rpad('abc', 2, '*') => "abc"
701 rpad('abc', 3, '*') => "abc"
702 rpad('abc', 10, '*') => "abc*******"
703 rpad('abc', 32768, '*') => ""
704 rpad('abc', $sysmis, '*') => ""
705 rpad('abc', $sysmis, '') => ""
706 rpad('abc', $sysmis, 'xy') => ""
707 rpad(0, 10) => error
708 rpad('abc', 'def') => error
709 rpad(0, 10, ' ') => error
710 rpad('abc', 'def', ' ') => error
711 rpad('x', 5, 0) => error
712 rpad('x', 5, 2) => error
713
714 rtrim('abc   ') => "abc"
715 rtrim('   abc   ') => "   abc"
716 rtrim('abc') => "abc"
717 rtrim('abc      ') => "abc      "
718 rtrim('    ') => ""
719 rtrim('') => ""
720 rtrim(8) => error
721 rtrim('abc***', '*') => "abc"
722 rtrim('abc', '*') => "abc"
723 rtrim('abc*', '*') => "abc"
724 rtrim('', '*') => ""
725 rtrim(8, '*') => error
726 rtrim(' x', 8) => error
727 rtrim(8, 9) => error
728
729 string(123.56, f5.1) => "123.6"
730 string($sysmis, f5.1) => "   . "
731 string("abc", A5) => error
732 string(123, e1) => error        # E has a minimum width of 6 on output.
733 string(123, e6.0) => " 1E+02"
734
735 substr('abcdefgh', -5) => ""
736 substr('abcdefgh', 0) => ""
737 substr('abcdefgh', 1) => "abcdefgh"
738 substr('abcdefgh', 3) => "cdefgh"
739 substr('abcdefgh', 5) => "efgh"
740 substr('abcdefgh', 6) => "fgh"
741 substr('abcdefgh', 7) => "gh"
742 substr('abcdefgh', 8) => "h"
743 substr('abcdefgh', 9) => ""
744 substr('abcdefgh', 10) => ""
745 substr('abcdefgh', 20) => ""
746 substr('abcdefgh', $sysmis) => ""
747 substr(0, 10) => error
748 substr('abcd', 'abc') => error
749 substr(0, 'abc') => error
750
751 substr('abcdefgh', 0, 0) => ""
752 substr('abcdefgh', 3, 0) => ""
753 substr('abcdefgh', 5, 0) => ""
754 substr('abcdefgh', 9, 0) => ""
755 substr('abcdefgh', 0, 1) => ""
756 substr('abcdefgh', 0, 5) => ""
757 substr('abcdefgh', 1, 8) => "abcdefgh"
758 substr('abcdefgh', 1, 10) => "abcdefgh"
759 substr('abcdefgh', 1, 20) => "abcdefgh"
760 substr('abcdefgh', 3, 4) => "cdef"
761 substr('abcdefgh', 5, 2) => "ef"
762 substr('abcdefgh', 6, 1) => "f"
763 substr('abcdefgh', 7, 10) => "gh"
764 substr('abcdefgh', 8, 1) => "h"
765 substr('abcdefgh', 8, 2) => "h"
766 substr('abcdefgh', 9, 11) => ""
767 substr('abcdefgh', 10, 52) => ""
768 substr('abcdefgh', 20, 1) => ""
769 substr('abcdefgh', $sysmis, 2) => ""
770 substr('abcdefgh', 9, $sysmis) => ""
771 substr('abcdefgh', $sysmis, $sysmis) => ""
772 substr('abc', 1, 'x') => error
773 substr(0, 10, 1) => error
774 substr(0, 10, 'x') => error
775 substr('abcd', 'abc', 0) => error
776 substr('abcd', 'abc', 'j') => error
777 substr(0, 'abc', 4) => error
778 substr(0, 'abc', 'k') => error
779
780 upcase('abcdefghijklmnopqrstuvwxyz!@%&*(089') => "ABCDEFGHIJKLMNOPQRSTUVWXYZ!@%&*(089"
781 upcase('') => ""
782 upcase(1) => error
783
784 time.days(1) => 86400.00
785 time.days(-1) => -86400.00
786 time.days(0.5) => 43200.00
787 time.days('x') => error
788 time.days($sysmis) => sysmis
789
790 time.hms(4,50,38) => 17438.00
791 time.hms(12,31,35) => 45095.00
792 time.hms(12,47,53) => 46073.00
793 time.hms(1,26,0) => 5160.00
794 time.hms(20,58,11) => 75491.00
795 time.hms(7,36,5) => 27365.00
796 time.hms(15,43,49) => 56629.00
797 time.hms(4,25,9) => 15909.00
798 time.hms(6,49,27) => 24567.00
799 time.hms(2,57,52) => 10672.00
800 time.hms(16,45,44) => 60344.00
801 time.hms(21,30,57) => 77457.00
802 time.hms(22,30,4) => 81004.00
803 time.hms(1,56,51) => 7011.00
804 time.hms(5, 6, 7) => 18367.00
805 time.hms(5, 6, 0) => 18360.00
806 time.hms(5, 0, 7) => 18007.00
807 time.hms(0, 6, 7) => 367.00
808 time.hms(-5, 6, -7) => sysmis
809 time.hms(-5, 5, -7) => sysmis
810 time.hms($sysmis, 6, 7) => sysmis
811 time.hms(5, $sysmis, 7) => sysmis
812 time.hms(5, $sysmis, 7) => sysmis
813 time.hms($sysmis, $sysmis, 7) => sysmis
814 time.hms(5, $sysmis, $sysmis) => sysmis
815 time.hms($sysmis, $sysmis, 7) => sysmis
816 time.hms($sysmis, $sysmis, $sysmis) => sysmis
817
818 ctime.days(106272) => 1.23
819 ctime.hours(106272) => 29.52
820 ctime.minutes(106272) => 1771.20
821 ctime.seconds(106272) => 106272.00
822 ctime.days(-106272) => -1.23
823 ctime.hours(-106272) => -29.52
824 ctime.minutes(-106272) => -1771.20
825 ctime.seconds(-106272) => -106272.00
826 ctime.days($sysmis) => sysmis
827 ctime.hours($sysmis) => sysmis
828 ctime.minutes($sysmis) => sysmis
829 ctime.seconds($sysmis) => sysmis
830 ctime.days('a') => error
831 ctime.hours('b') => error
832 ctime.minutes('c') => error
833 ctime.seconds('d') => error
834
835 ctime.days(date.dmy(15,10,1582)) => 1.00
836 ctime.days(date.dmy(6,9,1719)) => 50000.00
837 ctime.days(date.dmy(24,1,1583)) => 102.00
838 ctime.days(date.dmy(14,12,1585)) => 1157.00
839 ctime.days(date.dmy(26,11,1621)) => 14288.00
840 ctime.days(date.dmy(25,12,1821)) => 87365.00
841 ctime.days(date.dmy(3,12,1882)) => 109623.00
842 ctime.days(date.dmy(6,4,2002)) => 153211.00
843 ctime.days(date.dmy(19,12,1999)) => 152372.00
844 ctime.days(date.dmy(1,10,1978)) => 144623.00
845 ctime.days(date.dmy(0,10,1978)) => 144622.00
846 ctime.days(date.dmy(32,10,1978)) => sysmis
847 ctime.days(date.dmy(31,0,1978)) => 144349.00
848 ctime.days(date.dmy(31,13,1978)) => 144745.00
849 ctime.days(date.dmy($sysmis,10,1978)) => sysmis
850 ctime.days(date.dmy(31,$sysmis,1978)) => sysmis
851 ctime.days(date.dmy(31,10,$sysmis)) => sysmis
852 ctime.days(date.dmy($sysmis,$sysmis,1978)) => sysmis
853 ctime.days(date.dmy(31,$sysmis,$sysmis)) => sysmis
854 ctime.days(date.dmy($sysmis,10,$sysmis)) => sysmis
855 ctime.days(date.dmy($sysmis,$sysmis,$sysmis)) => sysmis
856 date.dmy('a',1,2) => error
857 date.dmy(1,'a',2) => error
858 date.dmy(1,2,'a') => error
859 # FIXME: check out-of-range and nearly out-of-range values
860
861 yrmoda(1582,10,15) => 1.00
862 yrmoda(1719,9,6) => 50000.00
863 yrmoda(1583,1,24) => 102.00
864 yrmoda(1585,12,14) => 1157.00
865 yrmoda(1621,11,26) => 14288.00
866 yrmoda(1821,12,25) => 87365.00
867 yrmoda(1882,12,3) => 109623.00
868 yrmoda(2002,4,6) => 153211.00
869 yrmoda(1999,12,19) => 152372.00
870 yrmoda(1978,10,1) => 144623.00
871 yrmoda(1978,10,0) => 144622.00
872 yrmoda(1978,10,32) => sysmis
873 yrmoda(1978,0,31) => 144349.00
874 yrmoda(1978,13,31) => 144745.00
875 yrmoda(1978,10,$sysmis) => sysmis
876 yrmoda(1978,$sysmis,31) => sysmis
877 yrmoda($sysmis,10,31) => sysmis
878 yrmoda(1978,$sysmis,$sysmis) => sysmis
879 yrmoda($sysmis,$sysmis,31) => sysmis
880 yrmoda($sysmis,10,$sysmis) => sysmis
881 yrmoda($sysmis,$sysmis,$sysmis) => sysmis
882 yrmoda('a',1,2) => error
883 yrmoda(1,'a',2) => error
884 yrmoda(1,2,'a') => error
885 # FIXME: check out-of-range and nearly out-of-range values
886
887 ctime.days(date.mdy(6,10,1648)) + 577735 => 601716.00
888 ctime.days(date.mdy(6,30,1680)) + 577735 => 613424.00
889 ctime.days(date.mdy(7,24,1716)) + 577735 => 626596.00
890 ctime.days(date.mdy(6,19,1768)) + 577735 => 645554.00
891 ctime.days(date.mdy(8,2,1819)) + 577735 => 664224.00
892 ctime.days(date.mdy(3,27,1839)) + 577735 => 671401.00
893 ctime.days(date.mdy(4,19,1903)) + 577735 => 694799.00
894 ctime.days(date.mdy(8,25,1929)) + 577735 => 704424.00
895 ctime.days(date.mdy(9,29,1941)) + 577735 => 708842.00
896 ctime.days(date.mdy(4,19,1943)) + 577735 => 709409.00
897 ctime.days(date.mdy(10,7,1943)) + 577735 => 709580.00
898 ctime.days(date.mdy(3,17,1992)) + 577735 => 727274.00
899 ctime.days(date.mdy(2,25,1996)) + 577735 => 728714.00
900 ctime.days(date.mdy(11,10,2038)) + 577735 => 744313.00
901 ctime.days(date.mdy(7,18,2094)) + 577735 => 764652.00
902 # FIXME: check out-of-range and nearly out-of-range values
903
904 ctime.days(date.mdy(10,15,1582)) => 1.00
905 ctime.days(date.mdy(9,6,1719)) => 50000.00
906 ctime.days(date.mdy(1,24,1583)) => 102.00
907 ctime.days(date.mdy(12,14,1585)) => 1157.00
908 ctime.days(date.mdy(11,26,1621)) => 14288.00
909 ctime.days(date.mdy(12,25,1821)) => 87365.00
910 ctime.days(date.mdy(12,3,1882)) => 109623.00
911 ctime.days(date.mdy(4,6,2002)) => 153211.00
912 ctime.days(date.mdy(12,19,1999)) => 152372.00
913 ctime.days(date.mdy(10,1,1978)) => 144623.00
914 ctime.days(date.mdy(10,0,1978)) => 144622.00
915 ctime.days(date.mdy(10,32,1978)) => sysmis
916 ctime.days(date.mdy(0,31,1978)) => 144349.00
917 ctime.days(date.mdy(13,31,1978)) => 144745.00
918 ctime.days(date.mdy(10,$sysmis,1978)) => sysmis
919 ctime.days(date.mdy($sysmis,31,1978)) => sysmis
920 ctime.days(date.mdy(10,31,$sysmis)) => sysmis
921 ctime.days(date.mdy($sysmis,$sysmis,1978)) => sysmis
922 ctime.days(date.mdy($sysmis,31,$sysmis)) => sysmis
923 ctime.days(date.mdy(10,$sysmis,$sysmis)) => sysmis
924 ctime.days(date.mdy($sysmis,$sysmis,$sysmis)) => sysmis
925 date.mdy('a',1,2) => error
926 date.mdy(1,'a',2) => error
927 date.mdy(1,2,'a') => error
928 ctime.days(date.mdy(0,0,0)) => 152353.00
929 ctime.days(date.mdy(0,0,999)) => sysmis
930 date.mdy(1,1,1582) => sysmis
931 date.mdy(10,14,1582) => sysmis
932 date.mdy(10,15,1582) => 86400.00
933
934 ctime.days(date.moyr(1,2000)) => 152385.00
935 ctime.days(date.moyr(2,2000)) => 152416.00
936 ctime.days(date.moyr(3,2000)) => 152445.00
937 ctime.days(date.moyr(4,2000)) => 152476.00
938 ctime.days(date.moyr(5,2000)) => 152506.00
939 ctime.days(date.moyr(13,2000)) => 152751.00
940 ctime.days(date.moyr(14,2000)) => sysmis
941 ctime.days(date.moyr($sysmis,2000)) => sysmis
942 ctime.days(date.moyr(1,$sysmis)) => sysmis
943 ctime.days(date.moyr($sysmis,$sysmis)) => sysmis
944 date.moyr('a',2000) => error
945 date.moyr(5,'a') => error
946 date.moyr('a','b') => error
947
948 ctime.days(date.qyr(1,2000)) => 152385.00
949 ctime.days(date.qyr(2,2000)) => 152476.00
950 ctime.days(date.qyr(5,2000)) => 152751.00
951 ctime.days(date.qyr(6,2000)) => sysmis
952 ctime.days(date.qyr($sysmis,2000)) => sysmis
953 ctime.days(date.qyr(1,$sysmis)) => sysmis
954 ctime.days(date.qyr($sysmis,$sysmis)) => sysmis
955 date.qyr('a',2000) => error
956 date.qyr(5,'a') => error
957 date.qyr('a','b') => error
958
959 ctime.days(date.wkyr(1,2000)) => 152385.00
960 ctime.days(date.wkyr(15,1999)) => 152118.00
961 ctime.days(date.wkyr(36,1999)) => 152265.00
962 ctime.days(date.wkyr(54,1999)) => sysmis
963 ctime.days(date.wkyr($sysmis,1999)) => sysmis
964 ctime.days(date.wkyr(1,$sysmis)) => sysmis
965 ctime.days(date.wkyr($sysmis,$sysmis)) => sysmis
966 date.wkyr('a',1999) => error
967 date.wkyr(5,'a') => error
968 date.wkyr('a','b') => error
969
970 ctime.days(date.yrday(2000,1)) => 152385.00
971 ctime.days(date.yrday(2000,100)) => 152484.00
972 ctime.days(date.yrday(2000,253)) => 152637.00
973 ctime.days(date.yrday(2000,500)) => sysmis
974 ctime.days(date.yrday(2000,-100)) => sysmis
975 ctime.days(date.yrday(1999,$sysmis)) => sysmis
976 ctime.days(date.yrday($sysmis,1)) => sysmis
977 ctime.days(date.yrday($sysmis,$sysmis)) => sysmis
978 date.yrday(1999,'a') => error
979 date.yrday('a',5) => error
980 date.yrday('a','b') => error
981
982 xdate.date(date.mdy(6,10,1648) + time.hms(0,0,0)) / 86400 => 23981.00
983 xdate.date(date.mdy(6,30,1680) + time.hms(4,50,38)) / 86400 => 35689.00
984 xdate.date(date.mdy(7,24,1716) + time.hms(12,31,35)) / 86400 => 48861.00
985 xdate.date(date.mdy(6,19,1768) + time.hms(12,47,53)) / 86400 => 67819.00
986 xdate.date(date.mdy(8,2,1819) + time.hms(1,26,0)) / 86400 => 86489.00
987 xdate.date(date.mdy(3,27,1839) + time.hms(20,58,11)) / 86400 => 93666.00
988 xdate.date(date.mdy(4,19,1903) + time.hms(7,36,5)) / 86400 => 117064.00
989 xdate.date(date.mdy(8,25,1929) + time.hms(15,43,49)) / 86400 => 126689.00
990 xdate.date(date.mdy(9,29,1941) + time.hms(4,25,9)) / 86400 => 131107.00
991 xdate.date(date.mdy(4,19,1943) + time.hms(6,49,27)) / 86400 => 131674.00
992 xdate.date(date.mdy(10,7,1943) + time.hms(2,57,52)) / 86400 => 131845.00
993 xdate.date(date.mdy(3,17,1992) + time.hms(16,45,44)) / 86400 => 149539.00
994 xdate.date(date.mdy(2,25,1996) + time.hms(21,30,57)) / 86400 => 150979.00
995 xdate.date(date.mdy(9,29,41) + time.hms(4,25,9)) / 86400 => 131107.00
996 xdate.date(date.mdy(4,19,43) + time.hms(6,49,27)) / 86400 => 131674.00
997 xdate.date(date.mdy(10,7,43) + time.hms(2,57,52)) / 86400 => 131845.00
998 xdate.date(date.mdy(3,17,92) + time.hms(16,45,44)) / 86400 => 149539.00
999 xdate.date(date.mdy(2,25,96) + time.hms(21,30,57)) / 86400 => 150979.00
1000 xdate.date(date.mdy(11,10,2038) + time.hms(22,30,4)) / 86400 => 166578.00
1001 xdate.date(date.mdy(7,18,2094) + time.hms(1,56,51)) / 86400 => 186917.00
1002 xdate.date(123.4) => 0.00
1003 xdate.date('') => error
1004
1005 xdate.hour(date.mdy(6,10,1648) + time.hms(0,0,0)) => 0.00
1006 xdate.hour(date.mdy(6,30,1680) + time.hms(4,50,38)) => 4.00
1007 xdate.hour(date.mdy(7,24,1716) + time.hms(12,31,35)) => 12.00
1008 xdate.hour(date.mdy(6,19,1768) + time.hms(12,47,53)) => 12.00
1009 xdate.hour(date.mdy(8,2,1819) + time.hms(1,26,0)) => 1.00
1010 xdate.hour(date.mdy(3,27,1839) + time.hms(20,58,11)) => 20.00
1011 xdate.hour(date.mdy(4,19,1903) + time.hms(7,36,5)) => 7.00
1012 xdate.hour(date.mdy(8,25,1929) + time.hms(15,43,49)) => 15.00
1013 xdate.hour(date.mdy(9,29,1941) + time.hms(4,25,9)) => 4.00
1014 xdate.hour(date.mdy(4,19,1943) + time.hms(6,49,27)) => 6.00
1015 xdate.hour(date.mdy(10,7,1943) + time.hms(2,57,52)) => 2.00
1016 xdate.hour(date.mdy(3,17,1992) + time.hms(16,45,44)) => 16.00
1017 xdate.hour(date.mdy(2,25,1996) + time.hms(21,30,57)) => 21.00
1018 xdate.hour(date.mdy(9,29,41) + time.hms(4,25,9)) => 4.00
1019 xdate.hour(date.mdy(4,19,43) + time.hms(6,49,27)) => 6.00
1020 xdate.hour(date.mdy(10,7,43) + time.hms(2,57,52)) => 2.00
1021 xdate.hour(date.mdy(3,17,92) + time.hms(16,45,44)) => 16.00
1022 xdate.hour(date.mdy(2,25,96) + time.hms(21,30,57)) => 21.00
1023 xdate.hour(date.mdy(11,10,2038) + time.hms(22,30,4)) => 22.00
1024 xdate.hour(date.mdy(7,18,2094) + time.hms(1,56,51)) => 1.00
1025 xdate.hour(-1) => -1.00
1026 xdate.hour(1) => 0.00
1027 xdate.hour($sysmis) => sysmis
1028 xdate.hour('') => error
1029
1030 xdate.jday(date.mdy(6,10,1648) + time.hms(0,0,0)) => 162.00
1031 xdate.jday(date.mdy(6,30,1680) + time.hms(4,50,38)) => 182.00
1032 xdate.jday(date.mdy(7,24,1716) + time.hms(12,31,35)) => 206.00
1033 xdate.jday(date.mdy(6,19,1768) + time.hms(12,47,53)) => 171.00
1034 xdate.jday(date.mdy(8,2,1819) + time.hms(1,26,0)) => 214.00
1035 xdate.jday(date.mdy(3,27,1839) + time.hms(20,58,11)) => 86.00
1036 xdate.jday(date.mdy(4,19,1903) + time.hms(7,36,5)) => 109.00
1037 xdate.jday(date.mdy(8,25,1929) + time.hms(15,43,49)) => 237.00
1038 xdate.jday(date.mdy(9,29,1941) + time.hms(4,25,9)) => 272.00
1039 xdate.jday(date.mdy(4,19,1943) + time.hms(6,49,27)) => 109.00
1040 xdate.jday(date.mdy(10,7,1943) + time.hms(2,57,52)) => 280.00
1041 xdate.jday(date.mdy(3,17,1992) + time.hms(16,45,44)) => 77.00
1042 xdate.jday(date.mdy(2,25,1996) + time.hms(21,30,57)) => 56.00
1043 xdate.jday(date.mdy(9,29,41) + time.hms(4,25,9)) => 272.00
1044 xdate.jday(date.mdy(4,19,43) + time.hms(6,49,27)) => 109.00
1045 xdate.jday(date.mdy(10,7,43) + time.hms(2,57,52)) => 280.00
1046 xdate.jday(date.mdy(3,17,92) + time.hms(16,45,44)) => 77.00
1047 xdate.jday(date.mdy(2,25,96) + time.hms(21,30,57)) => 56.00
1048 xdate.jday(date.mdy(11,10,2038) + time.hms(22,30,4)) => 314.00
1049 xdate.jday(date.mdy(7,18,2094) + time.hms(1,56,51)) => 199.00
1050 xdate.jday(0) => sysmis
1051 xdate.jday(1) => sysmis
1052 xdate.jday(86400) => 288.00
1053
1054 xdate.mday(date.mdy(6,10,1648) + time.hms(0,0,0)) => 10.00
1055 xdate.mday(date.mdy(6,30,1680) + time.hms(4,50,38)) => 30.00
1056 xdate.mday(date.mdy(7,24,1716) + time.hms(12,31,35)) => 24.00
1057 xdate.mday(date.mdy(6,19,1768) + time.hms(12,47,53)) => 19.00
1058 xdate.mday(date.mdy(8,2,1819) + time.hms(1,26,0)) => 2.00
1059 xdate.mday(date.mdy(3,27,1839) + time.hms(20,58,11)) => 27.00
1060 xdate.mday(date.mdy(4,19,1903) + time.hms(7,36,5)) => 19.00
1061 xdate.mday(date.mdy(8,25,1929) + time.hms(15,43,49)) => 25.00
1062 xdate.mday(date.mdy(9,29,1941) + time.hms(4,25,9)) => 29.00
1063 xdate.mday(date.mdy(4,19,1943) + time.hms(6,49,27)) => 19.00
1064 xdate.mday(date.mdy(10,7,1943) + time.hms(2,57,52)) => 7.00
1065 xdate.mday(date.mdy(3,17,1992) + time.hms(16,45,44)) => 17.00
1066 xdate.mday(date.mdy(2,25,1996) + time.hms(21,30,57)) => 25.00
1067 xdate.mday(date.mdy(9,29,41) + time.hms(4,25,9)) => 29.00
1068 xdate.mday(date.mdy(4,19,43) + time.hms(6,49,27)) => 19.00
1069 xdate.mday(date.mdy(10,7,43) + time.hms(2,57,52)) => 7.00
1070 xdate.mday(date.mdy(3,17,92) + time.hms(16,45,44)) => 17.00
1071 xdate.mday(date.mdy(2,25,96) + time.hms(21,30,57)) => 25.00
1072 xdate.mday(date.mdy(11,10,2038) + time.hms(22,30,4)) => 10.00
1073 xdate.mday(date.mdy(7,18,2094) + time.hms(1,56,51)) => 18.00
1074
1075 xdate.minute(date.mdy(6,10,1648) + time.hms(0,0,0)) => 0.00
1076 xdate.minute(date.mdy(6,30,1680) + time.hms(4,50,38)) => 50.00
1077 xdate.minute(date.mdy(7,24,1716) + time.hms(12,31,35)) => 31.00
1078 xdate.minute(date.mdy(6,19,1768) + time.hms(12,47,53)) => 47.00
1079 xdate.minute(date.mdy(8,2,1819) + time.hms(1,26,0)) => 26.00
1080 xdate.minute(date.mdy(3,27,1839) + time.hms(20,58,11)) => 58.00
1081 xdate.minute(date.mdy(4,19,1903) + time.hms(7,36,5)) => 36.00
1082 xdate.minute(date.mdy(8,25,1929) + time.hms(15,43,49)) => 43.00
1083 xdate.minute(date.mdy(9,29,1941) + time.hms(4,25,9)) => 25.00
1084 xdate.minute(date.mdy(4,19,1943) + time.hms(6,49,27)) => 49.00
1085 xdate.minute(date.mdy(10,7,1943) + time.hms(2,57,52)) => 57.00
1086 xdate.minute(date.mdy(3,17,1992) + time.hms(16,45,44)) => 45.00
1087 xdate.minute(date.mdy(2,25,1996) + time.hms(21,30,57)) => 30.00
1088 xdate.minute(date.mdy(9,29,41) + time.hms(4,25,9)) => 25.00
1089 xdate.minute(date.mdy(4,19,43) + time.hms(6,49,27)) => 49.00
1090 xdate.minute(date.mdy(10,7,43) + time.hms(2,57,52)) => 57.00
1091 xdate.minute(date.mdy(3,17,92) + time.hms(16,45,44)) => 45.00
1092 xdate.minute(date.mdy(2,25,96) + time.hms(21,30,57)) => 30.00
1093 xdate.minute(date.mdy(11,10,2038) + time.hms(22,30,4)) => 30.00
1094 xdate.minute(date.mdy(7,18,2094) + time.hms(1,56,51)) => 56.00
1095
1096 xdate.month(date.mdy(6,10,1648) + time.hms(0,0,0)) => 6.00
1097 xdate.month(date.mdy(6,30,1680) + time.hms(4,50,38)) => 6.00
1098 xdate.month(date.mdy(7,24,1716) + time.hms(12,31,35)) => 7.00
1099 xdate.month(date.mdy(6,19,1768) + time.hms(12,47,53)) => 6.00
1100 xdate.month(date.mdy(8,2,1819) + time.hms(1,26,0)) => 8.00
1101 xdate.month(date.mdy(3,27,1839) + time.hms(20,58,11)) => 3.00
1102 xdate.month(date.mdy(4,19,1903) + time.hms(7,36,5)) => 4.00
1103 xdate.month(date.mdy(8,25,1929) + time.hms(15,43,49)) => 8.00
1104 xdate.month(date.mdy(9,29,1941) + time.hms(4,25,9)) => 9.00
1105 xdate.month(date.mdy(4,19,1943) + time.hms(6,49,27)) => 4.00
1106 xdate.month(date.mdy(10,7,1943) + time.hms(2,57,52)) => 10.00
1107 xdate.month(date.mdy(3,17,1992) + time.hms(16,45,44)) => 3.00
1108 xdate.month(date.mdy(2,25,1996) + time.hms(21,30,57)) => 2.00
1109 xdate.month(date.mdy(9,29,41) + time.hms(4,25,9)) => 9.00
1110 xdate.month(date.mdy(4,19,43) + time.hms(6,49,27)) => 4.00
1111 xdate.month(date.mdy(10,7,43) + time.hms(2,57,52)) => 10.00
1112 xdate.month(date.mdy(3,17,92) + time.hms(16,45,44)) => 3.00
1113 xdate.month(date.mdy(2,25,96) + time.hms(21,30,57)) => 2.00
1114 xdate.month(date.mdy(11,10,2038) + time.hms(22,30,4)) => 11.00
1115 xdate.month(date.mdy(7,18,2094) + time.hms(1,56,51)) => 7.00
1116
1117 xdate.quarter(date.mdy(6,10,1648) + time.hms(0,0,0)) => 2.00
1118 xdate.quarter(date.mdy(6,30,1680) + time.hms(4,50,38)) => 2.00
1119 xdate.quarter(date.mdy(7,24,1716) + time.hms(12,31,35)) => 3.00
1120 xdate.quarter(date.mdy(6,19,1768) + time.hms(12,47,53)) => 2.00
1121 xdate.quarter(date.mdy(8,2,1819) + time.hms(1,26,0)) => 3.00
1122 xdate.quarter(date.mdy(3,27,1839) + time.hms(20,58,11)) => 1.00
1123 xdate.quarter(date.mdy(4,19,1903) + time.hms(7,36,5)) => 2.00
1124 xdate.quarter(date.mdy(8,25,1929) + time.hms(15,43,49)) => 3.00
1125 xdate.quarter(date.mdy(9,29,1941) + time.hms(4,25,9)) => 3.00
1126 xdate.quarter(date.mdy(4,19,1943) + time.hms(6,49,27)) => 2.00
1127 xdate.quarter(date.mdy(10,7,1943) + time.hms(2,57,52)) => 4.00
1128 xdate.quarter(date.mdy(3,17,1992) + time.hms(16,45,44)) => 1.00
1129 xdate.quarter(date.mdy(2,25,1996) + time.hms(21,30,57)) => 1.00
1130 xdate.quarter(date.mdy(9,29,41) + time.hms(4,25,9)) => 3.00
1131 xdate.quarter(date.mdy(4,19,43) + time.hms(6,49,27)) => 2.00
1132 xdate.quarter(date.mdy(10,7,43) + time.hms(2,57,52)) => 4.00
1133 xdate.quarter(date.mdy(3,17,92) + time.hms(16,45,44)) => 1.00
1134 xdate.quarter(date.mdy(2,25,96) + time.hms(21,30,57)) => 1.00
1135 xdate.quarter(date.mdy(11,10,2038) + time.hms(22,30,4)) => 4.00
1136 xdate.quarter(date.mdy(7,18,2094) + time.hms(1,56,51)) => 3.00
1137
1138 xdate.second(date.mdy(6,10,1648) + time.hms(0,0,0)) => 0.00
1139 xdate.second(date.mdy(6,30,1680) + time.hms(4,50,38)) => 38.00
1140 xdate.second(date.mdy(7,24,1716) + time.hms(12,31,35)) => 35.00
1141 xdate.second(date.mdy(6,19,1768) + time.hms(12,47,53)) => 53.00
1142 xdate.second(date.mdy(8,2,1819) + time.hms(1,26,0)) => 0.00
1143 xdate.second(date.mdy(3,27,1839) + time.hms(20,58,11)) => 11.00
1144 xdate.second(date.mdy(4,19,1903) + time.hms(7,36,5)) => 5.00
1145 xdate.second(date.mdy(8,25,1929) + time.hms(15,43,49)) => 49.00
1146 xdate.second(date.mdy(9,29,1941) + time.hms(4,25,9)) => 9.00
1147 xdate.second(date.mdy(4,19,1943) + time.hms(6,49,27)) => 27.00
1148 xdate.second(date.mdy(10,7,1943) + time.hms(2,57,52)) => 52.00
1149 xdate.second(date.mdy(3,17,1992) + time.hms(16,45,44)) => 44.00
1150 xdate.second(date.mdy(2,25,1996) + time.hms(21,30,57)) => 57.00
1151 xdate.second(date.mdy(9,29,41) + time.hms(4,25,9)) => 9.00
1152 xdate.second(date.mdy(4,19,43) + time.hms(6,49,27)) => 27.00
1153 xdate.second(date.mdy(10,7,43) + time.hms(2,57,52)) => 52.00
1154 xdate.second(date.mdy(3,17,92) + time.hms(16,45,44)) => 44.00
1155 xdate.second(date.mdy(2,25,96) + time.hms(21,30,57)) => 57.00
1156 xdate.second(date.mdy(11,10,2038) + time.hms(22,30,4)) => 4.00
1157 xdate.second(date.mdy(7,18,2094) + time.hms(1,56,51)) => 51.00
1158
1159 xdate.tday(date.mdy(6,10,1648) + time.hms(0,0,0)) => 23981.00
1160 xdate.tday(date.mdy(6,30,1680) + time.hms(4,50,38)) => 35689.00
1161 xdate.tday(date.mdy(7,24,1716) + time.hms(12,31,35)) => 48861.00
1162 xdate.tday(date.mdy(6,19,1768) + time.hms(12,47,53)) => 67819.00
1163 xdate.tday(date.mdy(8,2,1819) + time.hms(1,26,0)) => 86489.00
1164 xdate.tday(date.mdy(3,27,1839) + time.hms(20,58,11)) => 93666.00
1165 xdate.tday(date.mdy(4,19,1903) + time.hms(7,36,5)) => 117064.00
1166 xdate.tday(date.mdy(8,25,1929) + time.hms(15,43,49)) => 126689.00
1167 xdate.tday(date.mdy(9,29,1941) + time.hms(4,25,9)) => 131107.00
1168 xdate.tday(date.mdy(4,19,1943) + time.hms(6,49,27)) => 131674.00
1169 xdate.tday(date.mdy(10,7,1943) + time.hms(2,57,52)) => 131845.00
1170 xdate.tday(date.mdy(3,17,1992) + time.hms(16,45,44)) => 149539.00
1171 xdate.tday(date.mdy(2,25,1996) + time.hms(21,30,57)) => 150979.00
1172 xdate.tday(date.mdy(9,29,41) + time.hms(4,25,9)) => 131107.00
1173 xdate.tday(date.mdy(4,19,43) + time.hms(6,49,27)) => 131674.00
1174 xdate.tday(date.mdy(10,7,43) + time.hms(2,57,52)) => 131845.00
1175 xdate.tday(date.mdy(3,17,92) + time.hms(16,45,44)) => 149539.00
1176 xdate.tday(date.mdy(2,25,96) + time.hms(21,30,57)) => 150979.00
1177 xdate.tday(date.mdy(11,10,2038) + time.hms(22,30,4)) => 166578.00
1178 xdate.tday(date.mdy(7,18,2094) + time.hms(1,56,51)) => 186917.00
1179
1180 xdate.time(date.mdy(6,10,1648) + time.hms(0,0,0)) => 0.00
1181 xdate.time(date.mdy(6,30,1680) + time.hms(4,50,38)) => 17438.00
1182 xdate.time(date.mdy(7,24,1716) + time.hms(12,31,35)) => 45095.00
1183 xdate.time(date.mdy(6,19,1768) + time.hms(12,47,53)) => 46073.00
1184 xdate.time(date.mdy(8,2,1819) + time.hms(1,26,0)) => 5160.00
1185 xdate.time(date.mdy(3,27,1839) + time.hms(20,58,11)) => 75491.00
1186 xdate.time(date.mdy(4,19,1903) + time.hms(7,36,5)) => 27365.00
1187 xdate.time(date.mdy(8,25,1929) + time.hms(15,43,49)) => 56629.00
1188 xdate.time(date.mdy(9,29,1941) + time.hms(4,25,9)) => 15909.00
1189 xdate.time(date.mdy(4,19,1943) + time.hms(6,49,27)) => 24567.00
1190 xdate.time(date.mdy(10,7,1943) + time.hms(2,57,52)) => 10672.00
1191 xdate.time(date.mdy(3,17,1992) + time.hms(16,45,44)) => 60344.00
1192 xdate.time(date.mdy(2,25,1996) + time.hms(21,30,57)) => 77457.00
1193 xdate.time(date.mdy(9,29,41) + time.hms(4,25,9)) => 15909.00
1194 xdate.time(date.mdy(4,19,43) + time.hms(6,49,27)) => 24567.00
1195 xdate.time(date.mdy(10,7,43) + time.hms(2,57,52)) => 10672.00
1196 xdate.time(date.mdy(3,17,92) + time.hms(16,45,44)) => 60344.00
1197 xdate.time(date.mdy(2,25,96) + time.hms(21,30,57)) => 77457.00
1198 xdate.time(date.mdy(11,10,2038) + time.hms(22,30,4)) => 81004.00
1199 xdate.time(date.mdy(7,18,2094) + time.hms(1,56,51)) => 7011.00
1200
1201 xdate.week(date.mdy(6,10,1648) + time.hms(0,0,0)) => 24.00
1202 xdate.week(date.mdy(6,30,1680) + time.hms(4,50,38)) => 26.00
1203 xdate.week(date.mdy(7,24,1716) + time.hms(12,31,35)) => 30.00
1204 xdate.week(date.mdy(6,19,1768) + time.hms(12,47,53)) => 25.00
1205 xdate.week(date.mdy(8,2,1819) + time.hms(1,26,0)) => 31.00
1206 xdate.week(date.mdy(3,27,1839) + time.hms(20,58,11)) => 13.00
1207 xdate.week(date.mdy(4,19,1903) + time.hms(7,36,5)) => 16.00
1208 xdate.week(date.mdy(8,25,1929) + time.hms(15,43,49)) => 34.00
1209 xdate.week(date.mdy(9,29,1941) + time.hms(4,25,9)) => 39.00
1210 xdate.week(date.mdy(4,19,1943) + time.hms(6,49,27)) => 16.00
1211 xdate.week(date.mdy(10,7,1943) + time.hms(2,57,52)) => 40.00
1212 xdate.week(date.mdy(3,17,1992) + time.hms(16,45,44)) => 11.00
1213 xdate.week(date.mdy(2,25,1996) + time.hms(21,30,57)) => 8.00
1214 xdate.week(date.mdy(9,29,41) + time.hms(4,25,9)) => 39.00
1215 xdate.week(date.mdy(4,19,43) + time.hms(6,49,27)) => 16.00
1216 xdate.week(date.mdy(10,7,43) + time.hms(2,57,52)) => 40.00
1217 xdate.week(date.mdy(3,17,92) + time.hms(16,45,44)) => 11.00
1218 xdate.week(date.mdy(2,25,96) + time.hms(21,30,57)) => 8.00
1219 xdate.week(date.mdy(11,10,2038) + time.hms(22,30,4)) => 45.00
1220 xdate.week(date.mdy(7,18,2094) + time.hms(1,56,51)) => 29.00
1221
1222 xdate.wkday(date.mdy(6,10,1648)) => 4.00
1223 xdate.wkday(date.mdy(6,30,1680)) => 1.00
1224 xdate.wkday(date.mdy(7,24,1716)) => 6.00
1225 xdate.wkday(date.mdy(6,19,1768)) => 1.00
1226 xdate.wkday(date.mdy(8,2,1819)) => 2.00
1227 xdate.wkday(date.mdy(3,27,1839)) => 4.00
1228 xdate.wkday(date.mdy(4,19,1903)) => 1.00
1229 xdate.wkday(date.mdy(8,25,1929)) => 1.00
1230 xdate.wkday(date.mdy(9,29,1941)) => 2.00
1231 xdate.wkday(date.mdy(4,19,1943)) => 2.00
1232 xdate.wkday(date.mdy(10,7,1943)) => 5.00
1233 xdate.wkday(date.mdy(3,17,1992)) => 3.00
1234 xdate.wkday(date.mdy(2,25,1996)) => 1.00
1235 xdate.wkday(date.mdy(9,29,41)) => 2.00
1236 xdate.wkday(date.mdy(4,19,43)) => 2.00
1237 xdate.wkday(date.mdy(10,7,43)) => 5.00
1238 xdate.wkday(date.mdy(3,17,92)) => 3.00
1239 xdate.wkday(date.mdy(2,25,96)) => 1.00
1240 xdate.wkday(date.mdy(11,10,2038)) => 4.00
1241 xdate.wkday(date.mdy(7,18,2094)) => 1.00
1242
1243 xdate.year(date.mdy(6,10,1648) + time.hms(0,0,0)) => 1648.00
1244 xdate.year(date.mdy(6,30,1680) + time.hms(4,50,38)) => 1680.00
1245 xdate.year(date.mdy(7,24,1716) + time.hms(12,31,35)) => 1716.00
1246 xdate.year(date.mdy(6,19,1768) + time.hms(12,47,53)) => 1768.00
1247 xdate.year(date.mdy(8,2,1819) + time.hms(1,26,0)) => 1819.00
1248 xdate.year(date.mdy(3,27,1839) + time.hms(20,58,11)) => 1839.00
1249 xdate.year(date.mdy(4,19,1903) + time.hms(7,36,5)) => 1903.00
1250 xdate.year(date.mdy(8,25,1929) + time.hms(15,43,49)) => 1929.00
1251 xdate.year(date.mdy(9,29,1941) + time.hms(4,25,9)) => 1941.00
1252 xdate.year(date.mdy(4,19,1943) + time.hms(6,49,27)) => 1943.00
1253 xdate.year(date.mdy(10,7,1943) + time.hms(2,57,52)) => 1943.00
1254 xdate.year(date.mdy(3,17,1992) + time.hms(16,45,44)) => 1992.00
1255 xdate.year(date.mdy(2,25,1996) + time.hms(21,30,57)) => 1996.00
1256 xdate.year(date.mdy(9,29,41) + time.hms(4,25,9)) => 1941.00
1257 xdate.year(date.mdy(4,19,43) + time.hms(6,49,27)) => 1943.00
1258 xdate.year(date.mdy(10,7,43) + time.hms(2,57,52)) => 1943.00
1259 xdate.year(date.mdy(3,17,92) + time.hms(16,45,44)) => 1992.00
1260 xdate.year(date.mdy(2,25,96) + time.hms(21,30,57)) => 1996.00
1261 xdate.year(date.mdy(11,10,2038) + time.hms(22,30,4)) => 2038.00
1262 xdate.year(date.mdy(7,18,2094) + time.hms(1,56,51)) => 2094.00
1263
1264 # These test values are from Applied Statistics, Algorithm AS 310.
1265 1000 * ncdf.beta(.868,10,20,150) => 937.66
1266 1000 * ncdf.beta(.9,10,10,120) => 730.68
1267 1000 * ncdf.beta(.88,15,5,80) => 160.43
1268 1000 * ncdf.beta(.85,20,10,110) => 186.75
1269 1000 * ncdf.beta(.66,20,30,65) => 655.94
1270 1000 * ncdf.beta(.72,20,50,130) => 979.69
1271 1000 * ncdf.beta(.72,30,20,80) => 116.24
1272 1000 * ncdf.beta(.8,30,40,130) => 993.04
1273
1274 # FIXME: LAG
1275
1276 (X = 1.00); X => 1.00
1277 SYSMIS(1) => false
1278 SYSMIS($SYSMIS) => true
1279 SYSMIS(1 + $SYSMIS) => true
1280
1281 # FIXME: out-of-range and nearly out-of-range values on dates
1282
1283 # Tests correctness of generic optimizations in optimize_tree().
1284 (X = 10.00); x + 0 => 10.00
1285 (X = -3.00); x - 0 => -3.00
1286 (X = 5.00); 0 + x => 5.00
1287 (X = 10.00); x * 1 => 10.00
1288 (X = -3.00); 1 * x => -3.00
1289 (X = 5.00); x / 1 => 5.00
1290 (X = 10.00); 0 * x => 0.00
1291 (X = -3.00); x * 0 => 0.00
1292 (X = 5.00); 0 / x => 0.00
1293 (X = 5.00); mod(0, x) => 0.00
1294 (X = 5.00); x ** 1 => 5.00
1295 (X = 5.00); x ** 2 => 25.00
1296 EOF
1297 if [ $? -ne 0 ] ; then no_result ; fi
1298
1299 activity="create optimizing input"
1300 echo 'set mxwarn 1000.
1301 set mxerr 1000.' > $TEMPDIR/expr-opt.stat
1302 sed < $TEMPDIR/expr-list >> $TEMPDIR/expr-opt.stat \
1303         -e 's#^\(\(.*\); \)*\(.*\) => .*$#DEBUG EVALUATE\2/\3.#'
1304 if [ $? -ne 0 ] ; then no_result ; fi
1305
1306 activity="run optimizing program"
1307 $SUPERVISOR $PSPP --testing-mode -o raw-ascii \
1308          $TEMPDIR/expr-opt.stat >$TEMPDIR/expr-opt.err 2> $TEMPDIR/expr-opt.out
1309
1310 activity="compare optimizing output"
1311 perl -pi -e 's/^\s*$//g' $TEMPDIR/expr-list $TEMPDIR/expr-opt.out
1312 diff -b $TEMPDIR/expr-list $TEMPDIR/expr-opt.out
1313 if [ $? -ne 0 ] ; then fail ; fi
1314
1315 activity="create non-optimizing input"
1316 echo 'set mxwarn 1000.
1317 set mxerr 1000.' > $TEMPDIR/expr-noopt.stat
1318 sed < $TEMPDIR/expr-list >> $TEMPDIR/expr-noopt.stat \
1319         -e 's#^\(\(.*\); \)*\(.*\) => .*$#DEBUG EVALUATE NOOPTIMIZE\2/\3.#'
1320 if [ $? -ne 0 ] ; then no_result ; fi
1321
1322 activity="run non-optimizing program"
1323 $SUPERVISOR $PSPP --testing-mode -o raw-ascii \
1324         $TEMPDIR/expr-noopt.stat >$TEMPDIR/expr-noopt.err 2> $TEMPDIR/expr-noopt.out
1325
1326 activity="compare non-optimizing output"
1327 perl -pi -e 's/^\s*$//g' $TEMPDIR/expr-list $TEMPDIR/expr-noopt.out
1328 diff -b $TEMPDIR/expr-list $TEMPDIR/expr-noopt.out
1329 if [ $? -ne 0 ] ; then fail ; fi
1330
1331 activity="create optimizing postfix input"
1332 echo 'set mxwarn 1000.
1333 set mxerr 1000.' > $TEMPDIR/expr-opt-pos.stat
1334 sed < $TEMPDIR/expr-list >> $TEMPDIR/expr-opt-pos.stat \
1335         -e 's#^\(\(.*\); \)*\(.*\) => .*$#DEBUG EVALUATE POSTFIX\2/\3.#'
1336 if [ $? -ne 0 ] ; then no_result ; fi
1337
1338 activity="run optimizing postfix program"
1339 $SUPERVISOR $PSPP --testing-mode -o raw-ascii \
1340          $TEMPDIR/expr-opt-pos.stat >$TEMPDIR/expr-opt-pos.err 2> $TEMPDIR/expr-opt-pos.out
1341 if [ $? -eq 0 ] ; then no_result ; fi
1342
1343 activity="create non-optimizing postfix input"
1344 echo 'set mxwarn 1000.
1345 set mxerr 1000.' > $TEMPDIR/expr-noopt-pos.stat
1346 sed < $TEMPDIR/expr-list >> $TEMPDIR/expr-noopt-pos.stat \
1347         -e 's#^\(\(.*\); \)*\(.*\) => .*$#DEBUG EVALUATE NOOPTIMIZE POSTFIX\2/\3.#'
1348 if [ $? -ne 0 ] ; then no_result ; fi
1349
1350 activity="run non-optimizing postfix program"
1351 $SUPERVISOR $PSPP --testing-mode -o raw-ascii \
1352         $TEMPDIR/expr-noopt-pos.stat >$TEMPDIR/expr-noopt-pos.err 2> $TEMPDIR/expr-noopt-pos.out
1353 if [ $? -eq 0 ] ; then no_result ; fi
1354
1355 pass