expressions: Fix test failures due to new year.
[pspp-builds.git] / tests / language / expressions / evaluate.at
1 m4_define([CHECK_EXPR_EVAL],
2   [AT_SETUP([expressions - $1])
3    AT_DATA([evaluate.sps],
4      [set mxwarn 1000.
5 set mxerr 1000.
6 m4_foreach([check], [m4_shift($@)],
7                  [DEBUG EVALUATE NOOPT m4_argn(4, check)/[]m4_car(check).
8 DEBUG EVALUATE m4_argn(4, check)/[]m4_car(check).
9 ])])
10    AT_CAPTURE_FILE([evaluate.sps])
11    m4_pushdef([i], [2])
12    AT_CHECK([pspp --testing-mode --error-file=- --no-output evaluate.sps], 
13      [m4_if(m4_bregexp([m4_foreach([check], [m4_shift($@)], [m4_argn(3, check)])], [error:]), [-1], [0], [1])],
14      [m4_foreach([check], [m4_shift($@)],
15         [m4_define([i], m4_incr(i))dnl
16 m4_if(m4_argn(3, check), [], [], [evaluate.sps:[]i[]: m4_argn(3, check)
17 ])dnl
18 m4_argn(2, check)
19 m4_define([i], m4_incr(i))dnl
20 m4_if(m4_argn(3, check), [], [], [evaluate.sps:[]i[]: m4_argn(3, check)
21 ])dnl
22 m4_argn(2, check)
23 ])], [])
24    m4_popdef([i])
25    AT_CLEANUP])
26
27 AT_BANNER([expressions])
28
29 CHECK_EXPR_EVAL([numeric syntax],
30   [[1e2], [100.00]],
31   [[1e+2], [100.00]],
32   [[1e-2], [0.01]],
33   [[1e-99], [0.00]])
34
35 CHECK_EXPR_EVAL([coercion to/from Boolean],
36   [[0 AND 1], [false]],
37   [[$true AND 1], [true]],
38   [[1 OR $false], [true]],
39   [[1 OR $sysmis], [true]],
40   [[2 OR $sysmis], [sysmis],
41    [error: DEBUG EVALUATE: An operand of the logical disjunction (`OR') operator was found to have a value other than 0 (false), 1 (true), or the system-missing value.  The result was forced to 0.]],
42   [[2 AND $sysmis], [false],
43    [error: DEBUG EVALUATE: An operand of the logical conjunction (`AND') operator was found to have a value other than 0 (false), 1 (true), or the system-missing value.  The result was forced to 0.]],
44   [['string' AND $sysmis], [error],
45    [error: DEBUG EVALUATE: Type mismatch while applying logical conjunction (`AND') operator: cannot convert string to boolean.]],
46   [[0 AND $sysmis], [false]],
47   [[(1>2) + 1], [1.00]],
48   [[$true + $false], [1.00]])
49
50 CHECK_EXPR_EVAL([addition and subtraction],
51   [[1 + 2], [3.00]],
52   [[1 + $true], [2.00]],
53   [[$sysmis + 1], [sysmis]],
54   [[7676 + $sysmis], [sysmis]],
55   [[('foo') + 5], [error],
56    [error: DEBUG EVALUATE: Type mismatch while applying addition (`+') operator: cannot convert string to number.]],
57   dnl Arithmetic concatenation requires CONCAT:
58   [[('foo') + ('bar')], [error],
59    [error: DEBUG EVALUATE: Type mismatch while applying addition (`+') operator: cannot convert string to number.]],
60   dnl Lexical concatenation succeeds:
61   [['foo' + 'bar'], ["foobar"]],
62   [[1 +3 - 2 +4 -5], [1.00]],
63   [[1 - $true], [0.00]],
64   [[$true - 4/3], [-0.33]],
65   [['string' - 1e10], [error],
66    [error: DEBUG EVALUATE: Type mismatch while applying subtraction (`-') operator: cannot convert string to number.]],
67   [[9.5 - ''], [error],
68    [error: DEBUG EVALUATE: Type mismatch while applying subtraction (`-') operator: cannot convert string to number.]],
69   [[1 - 2], [-1.00]],
70   [[52 -23], [29.00]])
71
72 CHECK_EXPR_EVAL([multiplication and division],
73   [[5 * 10], [50.00]],
74   [[10 * $true], [10.00]],
75   [[$true * 5], [5.00]],
76   [[1.5 * $true], [1.50]],
77   [[5 * $sysmis], [sysmis]],
78   [[$sysmis * 15], [sysmis]],
79   [[2 * 5 / 10], [1.00]],
80   [[1 / 2], [0.50]],
81   [[2 / 5], [0.40]],
82   [[12 / 3 / 2], [2.00]])
83
84 CHECK_EXPR_EVAL([exponentiation],
85   [[2**8], [256.00]],
86   [[(2**3)**4], [4096.00]],
87   [[2**3**4], [4096.00],
88    [warning: DEBUG EVALUATE: The exponentiation operator (`**') is left-associative, even though right-associative semantics are more useful.  That is, `a**b**c' equals `(a**b)**c', not as `a**(b**c)'.  To disable this warning, insert parentheses.]])
89
90 CHECK_EXPR_EVAL([unary minus],
91   [[2+-3], [-1.00]],
92   [[2*-3], [-6.00]],
93   [[-3**2], [-9.00]],
94   [[(-3)**2], [9.00]],
95   [[2**-1], [0.50]],
96   [[0**0], [sysmis]],
97   [[0**-1], [sysmis]],
98   [[(-3)**1.5], [sysmis]])
99
100 CHECK_EXPR_EVAL([AND truth table],
101   [[$false AND $false], [false]],
102   [[$false AND $true], [false]],
103   [[$false AND $sysmis], [false]],
104   [[$true AND $false], [false]],
105   [[$true AND $true], [true]],
106   [[$true AND $sysmis], [sysmis]],
107   [[$sysmis AND $false], [false]],
108   [[$sysmis AND $true], [sysmis]],
109   [[$sysmis AND $sysmis], [sysmis]],
110   [[$false & $false], [false]],
111   [[$false & $true], [false]],
112   [[$false & $sysmis], [false]],
113   [[$true & $false], [false]],
114   [[$true & $true], [true]],
115   [[$true & $sysmis], [sysmis]],
116   [[$sysmis & $false], [false]],
117   [[$sysmis & $true], [sysmis]],
118   [[$sysmis & $sysmis], [sysmis]])
119
120 CHECK_EXPR_EVAL([OR truth table],
121   [[$false OR $false], [false]],
122   [[$false OR $true], [true]],
123   [[$false OR $sysmis], [sysmis]],
124   [[$true OR $false], [true]],
125   [[$true OR $true], [true]],
126   [[$true OR $sysmis], [true]],
127   [[$sysmis OR $false], [sysmis]],
128   [[$sysmis OR $true], [true]],
129   [[$sysmis OR $sysmis], [sysmis]],
130   [[$false | $false], [false]],
131   [[$false | $true], [true]],
132   [[$false | $sysmis], [sysmis]],
133   [[$true | $false], [true]],
134   [[$true | $true], [true]],
135   [[$true | $sysmis], [true]],
136   [[$sysmis | $false], [sysmis]],
137   [[$sysmis | $true], [true]],
138   [[$sysmis | $sysmis], [sysmis]])
139
140 CHECK_EXPR_EVAL([NOT truth table],
141   [[not $false], [true]],
142   [[not 0], [true]],
143   [[not 2.5], [true],
144    [error: DEBUG EVALUATE: An operand of the logical negation (`NOT') operator was found to have a value other than 0 (false), 1 (true), or the system-missing value.  The result was forced to 0.]],
145   [[not $true], [false]],
146   [[not 1], [false]],
147   [[not $sysmis], [sysmis]],
148   [[~ $false], [true]],
149   [[~ 0], [true]],
150   [[~ 2.5], [true],
151    [error: DEBUG EVALUATE: An operand of the logical negation (`NOT') operator was found to have a value other than 0 (false), 1 (true), or the system-missing value.  The result was forced to 0.]],
152   [[~ $true], [false]],
153   [[~ 1], [false]],
154   [[~ $sysmis], [sysmis]])
155
156 CHECK_EXPR_EVAL([= <= <],
157   [[1 eq 1], [true]],
158   [[1 = 1], [true]],
159   [[1 eq 2], [false]],
160   [[2 = 3], [false]],
161   [[1 eq 'foobar'], [error],
162    [error: DEBUG EVALUATE: Type mismatch while applying numeric equality (`EQ') operator: cannot convert string to number.]],
163   [[5 eq 'foobar'], [error],
164    [error: DEBUG EVALUATE: Type mismatch while applying numeric equality (`EQ') operator: cannot convert string to number.]],
165   [['baz' = 10], [error],
166    [error: DEBUG EVALUATE: Type mismatch while applying string equality (`=') operator: cannot convert number to string.]],
167   [['quux' = 5.55], [error],
168    [error: DEBUG EVALUATE: Type mismatch while applying string equality (`=') operator: cannot convert number to string.]],
169   [['foobar' = 'foobar'], [true]],
170   [['quux' = 'bar'], [false]],
171   [['bar   ' = 'bar'], [true]],
172   [['asdf         ' = 'asdf  '], [true]],
173   [['asdfj   ' = 'asdf'], [false]],
174 dnl Check precedence:
175   [[1 + 2 = 3], [true]],
176   [[1 >= 2 = 2 ge 3], [false],
177    [warning: DEBUG EVALUATE: Chaining relational operators (e.g. `a < b < c') will not produce the mathematically expected result.  Use the AND logical operator to fix the problem (e.g. `a < b AND b < c').  If chaining is really intended, parentheses will disable this warning (e.g. `(a < b) < c'.)]],
178 dnl Mathematically true:
179   [[3 ne 2 ~= 1], [false],
180    [warning: DEBUG EVALUATE: Chaining relational operators (e.g. `a < b < c') will not produce the mathematically expected result.  Use the AND logical operator to fix the problem (e.g. `a < b AND b < c').  If chaining is really intended, parentheses will disable this warning (e.g. `(a < b) < c'.)]],
181   [[3 > 2 > 1], [false],
182    [warning: DEBUG EVALUATE: Chaining relational operators (e.g. `a < b < c') will not produce the mathematically expected result.  Use the AND logical operator to fix the problem (e.g. `a < b AND b < c').  If chaining is really intended, parentheses will disable this warning (e.g. `(a < b) < c'.)]],
183
184   [[1 <= 2], [true]],
185   [[2.5 <= 1.5], [false]],
186   [[1 le 2], [true]],
187   [[2 <= 2], [true]],
188   [[2 le 2], [true]],
189 dnl Make sure <= token can't be split:
190   [[2 < = 2], [error],
191    [error: DEBUG EVALUATE: Syntax error at `='.]],
192   [[1 <= 'foobar'], [error],
193    [error: DEBUG EVALUATE: Type mismatch while applying numeric less-than-or-equal-to (`<=') operator: cannot convert string to number.]],
194   [[5 <= 'foobar'], [error],
195    [error: DEBUG EVALUATE: Type mismatch while applying numeric less-than-or-equal-to (`<=') operator: cannot convert string to number.]],
196   [['baz' <= 10], [error],
197    [error: DEBUG EVALUATE: Type mismatch while applying string less-than-or-equal-to (`<=') operator: cannot convert number to string.]],
198   [['quux' <= 5.55], [error],
199    [error: DEBUG EVALUATE: Type mismatch while applying string less-than-or-equal-to (`<=') operator: cannot convert number to string.]],
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    [error: DEBUG EVALUATE: Type mismatch while applying numeric less than (`<') operator: cannot convert string to number.]],
212   [[5 lt 'foobar'], [error],
213    [error: DEBUG EVALUATE: Type mismatch while applying numeric less than (`<') operator: cannot convert string to number.]],
214   [['baz' < 10], [error],
215    [error: DEBUG EVALUATE: Type mismatch while applying string less than (`<') operator: cannot convert number to string.]],
216   [['quux' < 5.55], [error],
217    [error: DEBUG EVALUATE: Type mismatch while applying string less than (`<') operator: cannot convert number to string.]],
218   [['0123' lt '0123'], [false]],
219   [['0123' < '0124'], [true]],
220   [['0124' lt '0123'], [false]],
221   [['0123  ' < '0123'], [false]],
222   [['0123' lt '0123  '], [false]])
223
224 CHECK_EXPR_EVAL([>= > <>],
225   [[1 >= 2], [false]],
226   [[2.5 >= 1.5], [true]],
227   [[1 ge 2], [false]],
228   [[2 >= 2], [true]],
229   [[2 ge 2], [true]],
230 dnl Make sure >= token can't be split:
231   [[2 > = 2], [error],
232    [error: DEBUG EVALUATE: Syntax error at `='.]],
233   [[1 >= 'foobar'], [error],
234    [error: DEBUG EVALUATE: Type mismatch while applying numeric greater-than-or-equal-to (`>=') operator: cannot convert string to number.]],
235   [[5 ge 'foobar'], [error],
236    [error: DEBUG EVALUATE: Type mismatch while applying numeric greater-than-or-equal-to (`>=') operator: cannot convert string to number.]],
237   [['baz' ge 10], [error],
238    [error: DEBUG EVALUATE: Type mismatch while applying string greater-than-or-equal-to (`>=') operator: cannot convert number to string.]],
239   [['quux' >= 5.55], [error],
240    [error: DEBUG EVALUATE: Type mismatch while applying string greater-than-or-equal-to (`>=') operator: cannot convert number to string.]],
241   [['0123' ge '0123'], [true]],
242   [['0123' >= '0124'], [false]],
243   [['0124' >= '0123'], [true]],
244   [['0123  ' ge '0123'], [true]],
245   [['0123' >= '0123  '], [true]],
246
247   [[1 > 2], [false]],
248   [[2.5 > 1.5], [true]],
249   [[3.5 gt 4], [false]],
250   [[4 gt 3.5], [true]],
251   [[1 gt 'foobar'], [error],
252    [error: DEBUG EVALUATE: Type mismatch while applying numeric greater than (`>') operator: cannot convert string to number.]],
253   [[5 gt 'foobar'], [error],
254    [error: DEBUG EVALUATE: Type mismatch while applying numeric greater than (`>') operator: cannot convert string to number.]],
255   [['baz' > 10], [error],
256    [error: DEBUG EVALUATE: Type mismatch while applying string greater than (`>') operator: cannot convert number to string.]],
257   [['quux' > 5.55], [error],
258    [error: DEBUG EVALUATE: Type mismatch while applying string greater than (`>') operator: cannot convert number to string.]],
259   [['0123' gt '0123'], [false]],
260   [['0123' > '0124'], [false]],
261   [['0124' gt '0123'], [true]],
262   [['0123  ' > '0123'], [false]],
263   [['0123' gt '0123  '], [false]],
264
265   [[1 ne 1], [false]],
266   [[1 ~= 1], [false]],
267   [[1 <> 2], [true]],
268   [[2 ne 3], [true]],
269   [[1 ~= 'foobar'], [error],
270    [error: DEBUG EVALUATE: Type mismatch while applying numeric inequality (`<>') operator: cannot convert string to number.]],
271   [[5 <> 'foobar'], [error],
272    [error: DEBUG EVALUATE: Type mismatch while applying numeric inequality (`<>') operator: cannot convert string to number.]],
273   [['baz' ne 10], [error],
274    [error: DEBUG EVALUATE: Type mismatch while applying string inequality (`<>') operator: cannot convert number to string.]],
275   [['quux' ~= 5.55], [error],
276    [error: DEBUG EVALUATE: Type mismatch while applying string inequality (`<>') operator: cannot convert number to string.]],
277   [['foobar' <> 'foobar'], [false]],
278   [['quux' ne 'bar'], [true]],
279   [['bar   ' <> 'bar'], [false]],
280   [['asdf         ' ~= 'asdf  '], [false]],
281   [['asdfj   ' ne 'asdf'], [true]],
282 dnl <> token can't be split:
283   [[1 < > 1], [error],
284    [error: DEBUG EVALUATE: Syntax error at `>'.]],
285 dnl # ~= token can't be split:
286   [[1 ~ = 1], [error],
287    [error: DEBUG EVALUATE: Syntax error at `NOT': expecting end of command.]])
288
289 CHECK_EXPR_EVAL([exp lg10 ln sqrt abs mod mod10 rnd trunc],
290   [[exp(10)], [22026.47]],
291   [[exp('x')], [error],
292    [error: DEBUG EVALUATE: Type mismatch invoking EXP(number) as exp(string).]],
293
294   [[lg10(500)], [2.70]],
295   [[lg10('x')], [error],
296    [error: DEBUG EVALUATE: Type mismatch invoking LG10(number) as lg10(string).]],
297
298   [[ln(10)], [2.30]],
299   [[ln('x')], [error],
300    [error: DEBUG EVALUATE: Type mismatch invoking LN(number) as ln(string).]],
301
302   [[sqrt(500)], [22.36]],
303   [[sqrt('x')], [error],
304    [error: DEBUG EVALUATE: Type mismatch invoking SQRT(number) as sqrt(string).]],
305
306   [[abs(-10.5)], [10.50]],
307   [[abs(-55.79)], [55.79]],
308   [[abs(22)], [22.00]],
309   [[abs(0)], [0.00]],
310
311   [[mod(55.5, 2)], [1.50]],
312   [[mod(-55.5, 2)], [-1.50]],
313   [[mod(55.5, -2)], [1.50]],
314   [[mod(-55.5, -2)], [-1.50]],
315   [[mod('a', 2)], [error],
316    [error: DEBUG EVALUATE: Type mismatch invoking MOD(number, number) as mod(string, number).]],
317   [[mod(2, 'a')], [error],
318    [error: DEBUG EVALUATE: Type mismatch invoking MOD(number, number) as mod(number, string).]],
319   [[mod('a', 'b')], [error],
320    [error: DEBUG EVALUATE: Type mismatch invoking MOD(number, number) as mod(string, string).]],
321
322   [[mod10(55.5)], [5.50]],
323   [[mod10(-55.5)], [-5.50]],
324   [[mod10('x')], [error],
325    [error: DEBUG EVALUATE: Type mismatch invoking MOD10(number) as mod10(string).]],
326
327   [[rnd(5.4)], [5.00]],
328   [[rnd(5.6)], [6.00]],
329   [[rnd(-5.4)], [-5.00]],
330   [[rnd(-5.6)], [-6.00]],
331   [[rnd('x')], [error],
332    [error: DEBUG EVALUATE: Type mismatch invoking RND(number) as rnd(string).]],
333
334   [[trunc(1.2)], [1.00]],
335   [[trunc(1.9)], [1.00]],
336   [[trunc(-1.2)], [-1.00]],
337   [[trunc(-1.9)], [-1.00]],
338   [[trunc('x')], [error],
339    [error: DEBUG EVALUATE: Type mismatch invoking TRUNC(number) as trunc(string).]])
340
341 CHECK_EXPR_EVAL([acos arsin artan cos sin tan],
342   [[acos(.5) / 3.14159 * 180], [60.00]],
343   [[arcos(.75) / 3.14159 * 180], [41.41]],
344   [[arcos(-.5) / 3.14159 * 180], [120.00]],
345   [[acos(-.75) / 3.14159 * 180], [138.59]],
346   [[acos(-1) / 3.14159 * 180], [180.00]],
347   [[arcos(1) / 3.14159 * 180], [0.00]],
348   [[acos(-1.01)], [sysmis]],
349   [[arcos(1.01)], [sysmis]],
350   [[acos('x')], [error],
351    [error: DEBUG EVALUATE: Type mismatch invoking ACOS(number) as acos(string).]],
352
353   [[arsin(.5) / 3.14159 * 180], [30.00]],
354   [[asin(.25) / 3.14159 * 180], [14.48]],
355   [[arsin(-.5) / 3.14159 * 180], [-30.00]],
356   [[asin(-.25) / 3.14159 * 180], [-14.48]],
357   [[arsin(-1.01)], [sysmis]],
358   [[asin(1.01)], [sysmis]],
359   [[arsin('x')], [error],
360    [error: DEBUG EVALUATE: Type mismatch invoking ARSIN(number) as arsin(string).]],
361
362   [[artan(1) / 3.14159 * 180], [45.00]],
363   [[atan(10) / 3.14159 * 180], [84.29]],
364   [[artan(-1) / 3.14159 * 180], [-45.00]],
365   [[atan(-10) / 3.14159 * 180], [-84.29]],
366   [[artan('x')], [error],
367    [error: DEBUG EVALUATE: Type mismatch invoking ARTAN(number) as artan(string).]],
368
369   [[cos(60 / 180 * 3.14159)], [0.50]],
370   [[cos(45 / 180 * 3.14159)], [0.71]],
371   [[cos(30 / 180 * 3.14159)], [0.87]],
372   [[cos(15 / 180 * 3.14159)], [0.97]],
373   [[cos(-60 / 180 * 3.14159)], [0.50]],
374   [[cos(-45 / 180 * 3.14159)], [0.71]],
375   [[cos(-30 / 180 * 3.14159)], [0.87]],
376   [[cos(-15 / 180 * 3.14159)], [0.97]],
377   [[cos(123 / 180 * 3.14159)], [-0.54]],
378   [[cos(321 / 180 * 3.14159)], [0.78]],
379   [[cos('x')], [error],
380    [error: DEBUG EVALUATE: Type mismatch invoking COS(number) as cos(string).]],
381
382   [[sin(60 / 180 * 3.14159)], [0.87]],
383   [[sin(45 / 180 * 3.14159)], [0.71]],
384   [[sin(30 / 180 * 3.14159)], [0.50]],
385   [[sin(15 / 180 * 3.14159)], [0.26]],
386   [[sin(-60 / 180 * 3.14159)], [-0.87]],
387   [[sin(-45 / 180 * 3.14159)], [-0.71]],
388   [[sin(-30 / 180 * 3.14159)], [-0.50]],
389   [[sin(-15 / 180 * 3.14159)], [-0.26]],
390   [[sin(123 / 180 * 3.14159)], [0.84]],
391   [[sin(321 / 180 * 3.14159)], [-0.63]],
392   [[sin('x')], [error],
393    [error: DEBUG EVALUATE: Type mismatch invoking SIN(number) as sin(string).]],
394
395   [[tan(60 / 180 * 3.14159)], [1.73]],
396   [[tan(45 / 180 * 3.14159)], [1.00]],
397   [[tan(30 / 180 * 3.14159)], [0.58]],
398   [[tan(15 / 180 * 3.14159)], [0.27]],
399   [[tan(-60 / 180 * 3.14159)], [-1.73]],
400   [[tan(-45 / 180 * 3.14159)], [-1.00]],
401   [[tan(-30 / 180 * 3.14159)], [-0.58]],
402   [[tan(-15 / 180 * 3.14159)], [-0.27]],
403   [[tan(123 / 180 * 3.14159)], [-1.54]],
404   [[tan(321 / 180 * 3.14159)], [-0.81]],
405   [[tan('x')], [error],
406    [error: DEBUG EVALUATE: Type mismatch invoking TAN(number) as tan(string).]])
407 # FIXME: a variable name as the argument to SYSMIS is a special case
408 # that we don't yet test.  We also can't test VALUE this way.
409 CHECK_EXPR_EVAL([missing nmiss nvalid sysmis any range max min],
410   [[missing(10)], [false]],
411   [[missing($sysmis)], [true]],
412   [[missing(asin(1.01))], [true]],
413   [[missing(asin(.5))], [false]],
414   [[missing('    ')], [error],
415    [error: DEBUG EVALUATE: Type mismatch invoking MISSING(number) as missing(string).]],
416
417   [[nmiss($sysmis)], [1.00]],
418   [[nmiss(0)], [0.00]],
419   [[nmiss($sysmis, $sysmis, $sysmis)], [3.00]],
420   [[nmiss(1, 2, 3, 4)], [0.00]],
421   [[nmiss(1, $sysmis, $sysmis, 2, 2, $sysmis, $sysmis, 3, 4)], [4.00]],
422
423   [[nvalid($sysmis)], [0.00]],
424   [[nvalid(0)], [1.00]],
425   [[nvalid($sysmis, $sysmis, $sysmis)], [0.00]],
426   [[nvalid(1, 2, 3, 4)], [4.00]],
427   [[nvalid(1, $sysmis, $sysmis, 2, 2, $sysmis, $sysmis, 3, 4)], [5.00]],
428
429   [[sysmis(10)], [false]],
430   [[sysmis($sysmis)], [true]],
431   [[sysmis(asin(1.01))], [true]],
432   [[sysmis(asin(.5))], [false]],
433   [[sysmis('    ')], [error],
434    [error: DEBUG EVALUATE: Function invocation sysmis(string) does not match any known function.  Candidates are:
435 SYSMIS(num_variable)
436 SYSMIS(number).]],
437
438   [[any($sysmis, 1, $sysmis, 3)], [sysmis]],
439   [[any(1, 1, 2, 3)], [true]],
440   [[any(1, $true, 2, 3)], [true]],
441   [[any(1, $false, 2, 3)], [false]],
442   [[any(2, 1, 2, 3)], [true]],
443   [[any(3, 1, 2, 3)], [true]],
444   [[any(5, 1, 2, 3)], [false]],
445   [[any(1, 1, 1, 1)], [true]],
446   [[any($sysmis, 1, 1, 1)], [sysmis]],
447   [[any(1, $sysmis, $sysmis, $sysmis)], [sysmis]],
448   [[any($sysmis, $sysmis, $sysmis, $sysmis)], [sysmis]],
449   [[any(1)], [error],
450    [error: DEBUG EVALUATE: Function invocation any(number) does not match any known function.  Candidates are:
451 ANY(number, number[, number]...)
452 ANY(string, string[, string]...).]],
453   [[any('1', 2, 3, 4)], [error],
454    [error: DEBUG EVALUATE: Function invocation any(string, number, number, number) does not match any known function.  Candidates are:
455 ANY(number, number[, number]...)
456 ANY(string, string[, string]...).]],
457   [[any(1, '2', 3, 4)], [error],
458    [error: DEBUG EVALUATE: Function invocation any(number, string, number, number) does not match any known function.  Candidates are:
459 ANY(number, number[, number]...)
460 ANY(string, string[, string]...).]],
461   [[any(1, 2, '3', 4)], [error],
462    [error: DEBUG EVALUATE: Function invocation any(number, number, string, number) does not match any known function.  Candidates are:
463 ANY(number, number[, number]...)
464 ANY(string, string[, string]...).]],
465   [[any(1, 2, 3, '4')], [error],
466    [error: DEBUG EVALUATE: Function invocation any(number, number, number, string) does not match any known function.  Candidates are:
467 ANY(number, number[, number]...)
468 ANY(string, string[, string]...).]],
469
470   [[any('', 'a', '', 'c')], [true]],
471   [[any('a', 'a', 'b', 'c')], [true]],
472   [[any('b', 'a', 'b', 'c')], [true]],
473   [[any('c', 'a', 'b', 'c')], [true]],
474   [[any('e', 'a', 'b', 'c')], [false]],
475   [[any('a', 'a', 'a', 'a')], [true]],
476   [[any('', 'a', 'a', 'a')], [false]],
477   [[any('a', '', '', '')], [false]],
478   [[any('a')], [error],
479    [error: DEBUG EVALUATE: Function invocation any(string) does not match any known function.  Candidates are:
480 ANY(number, number[, number]...)
481 ANY(string, string[, string]...).]],
482   [[any('a', 'a  ', 'b', 'c')], [true]],
483   [[any('b   ', 'a', 'b', 'c')], [true]],
484   [[any('c   ', 'a', 'b', 'c     ')], [true]],
485   [[any(a, 'b', 'c', 'd')], [error],
486    [error: DEBUG EVALUATE: Function invocation any(format, string, string, string) does not match any known function.  Candidates are:
487 ANY(number, number[, number]...)
488 ANY(string, string[, string]...).]],
489   [[any('a', b, 'c', 'd')], [error],
490    [error: DEBUG EVALUATE: Unknown identifier b.]],
491   [[any('a', 'b', c, 'd')], [error],
492    [error: DEBUG EVALUATE: Unknown identifier c.]],
493   [[any('a', 'b', 'c', d)], [error],
494    [error: DEBUG EVALUATE: Unknown identifier d.]],
495
496   [[range(5, 1, 10)], [true]],
497   [[range(1, 1, 10)], [true]],
498   [[range(10, 1, 10)], [true]],
499   [[range(-1, 1, 10)], [false]],
500   [[range(12, 1, 10)], [false]],
501   [[range($sysmis, 1, 10)], [sysmis]],
502   [[range(5, 1, $sysmis)], [sysmis]],
503   [[range(5, $sysmis, 10)], [sysmis]],
504   [[range($sysmis, $sysmis, 10)], [sysmis ]],
505   [[range($sysmis, 1, $sysmis)], [sysmis]],
506   [[range($sysmis, $sysmis, $sysmis)], [sysmis]],
507   [[range(0, 1, 8, 10, 18)], [false]],
508   [[range(1, 1, 8, 10, 18)], [true]],
509   [[range(6, 1, 8, 10, 18)], [true]],
510   [[range(8, 1, 8, 10, 18)], [true]],
511   [[range(9, 1, 8, 10, 18)], [false]],
512   [[range(10, 1, 8, 10, 18)], [true]],
513   [[range(13, 1, 8, 10, 18)], [true]],
514   [[range(16, 1, 8, 10, 18)], [true]],
515   [[range(18, 1, 8, 10, 18)], [true]],
516   [[range(20, 1, 8, 10, 18)], [false]],
517   [[range(1)], [error],
518    [error: DEBUG EVALUATE: Function invocation range(number) does not match any known function.  Candidates are:
519 RANGE(number, number, number[, number, number]...)
520 RANGE(string, string, string[, string, string]...).]],
521   [[range(1, 2)], [error],
522    [error: DEBUG EVALUATE: RANGE(number, number, number[, number, number]...) must have an even number of arguments in list.]],
523   [[range(1, 2, 3, 4)], [error],
524    [error: DEBUG EVALUATE: RANGE(number, number, number[, number, number]...) must have an even number of arguments in list.]],
525   [[range(1, 2, 3, 4, 5, 6)], [error],
526    [error: DEBUG EVALUATE: RANGE(number, number, number[, number, number]...) must have an even number of arguments in list.]],
527   [[range('1', 2, 3)], [error],
528    [error: DEBUG EVALUATE: Function invocation range(string, number, number) does not match any known function.  Candidates are:
529 RANGE(number, number, number[, number, number]...)
530 RANGE(string, string, string[, string, string]...).]],
531   [[range(1, '2', 3)], [error],
532    [error: DEBUG EVALUATE: Function invocation range(number, string, number) does not match any known function.  Candidates are:
533 RANGE(number, number, number[, number, number]...)
534 RANGE(string, string, string[, string, string]...).]],
535   [[range(1, 2, '3')], [error],
536    [error: DEBUG EVALUATE: Function invocation range(number, number, string) does not match any known function.  Candidates are:
537 RANGE(number, number, number[, number, number]...)
538 RANGE(string, string, string[, string, string]...).]],
539
540   [[range('123', '111', '888')], [true]],
541   [[range('111', '111', '888')], [true]],
542   [[range('888', '111', '888')], [true]],
543   [[range('110', '111', '888')], [false]],
544   [[range('889', '111', '888')], [false]],
545   [[range('000', '111', '888')], [false]],
546   [[range('999', '111', '888')], [false]],
547   [[range('123   ', '111', '888')], [true]],
548   [[range('123', '111   ', '888')], [true]],
549   [[range('123', '111', '888   ')], [true]],
550   [[range('123', '111    ', '888   ')], [true]],
551   [[range('00', '01', '08', '10', '18')], [false]],
552   [[range('01', '01', '08', '10', '18')], [true]],
553   [[range('06', '01', '08', '10', '18')], [true]],
554   [[range('08', '01', '08', '10', '18')], [true]],
555   [[range('09', '01', '08', '10', '18')], [false]],
556   [[range('10', '01', '08', '10', '18')], [true]],
557   [[range('15', '01', '08', '10', '18')], [true]],
558   [[range('18', '01', '08', '10', '18')], [true]],
559   [[range('19', '01', '08', '10', '18')], [false]],
560   [[range('1')], [error],
561    [error: DEBUG EVALUATE: Function invocation range(string) does not match any known function.  Candidates are:
562 RANGE(number, number, number[, number, number]...)
563 RANGE(string, string, string[, string, string]...).]],
564   [[range('1', '2')], [error],
565    [error: DEBUG EVALUATE: RANGE(string, string, string[, string, string]...) must have an even number of arguments in list.]],
566   [[range('1', '2', '3', '4')], [error],
567    [error: DEBUG EVALUATE: RANGE(string, string, string[, string, string]...) must have an even number of arguments in list.]],
568   [[range('1', '2', '3', '4', '5', '6')], [error],
569    [error: DEBUG EVALUATE: RANGE(string, string, string[, string, string]...) must have an even number of arguments in list.]],
570   [[range(1, '2', '3')], [error],
571    [error: DEBUG EVALUATE: Function invocation range(number, string, string) does not match any known function.  Candidates are:
572 RANGE(number, number, number[, number, number]...)
573 RANGE(string, string, string[, string, string]...).]],
574   [[range('1', 2, '3')], [error],
575    [error: DEBUG EVALUATE: Function invocation range(string, number, string) does not match any known function.  Candidates are:
576 RANGE(number, number, number[, number, number]...)
577 RANGE(string, string, string[, string, string]...).]],
578   [[range('1', '2', 3)], [error],
579    [error: DEBUG EVALUATE: Function invocation range(string, string, number) does not match any known function.  Candidates are:
580 RANGE(number, number, number[, number, number]...)
581 RANGE(string, string, string[, string, string]...).]],
582
583   [[max(1, 2, 3, 4, 5)], [5.00]],
584   [[max(1, $sysmis, 2, 3, $sysmis, 4, 5)], [5.00]],
585   [[max(1, 2)], [2.00]],
586   [[max()], [error],
587    [error: DEBUG EVALUATE: Function invocation max() does not match any known function.  Candidates are:
588 MAX(number[, number]...)
589 MAX(string[, string]...).]],
590   [[max(1)], [1.00]],
591   [[max(1, $sysmis)], [1.00]],
592   [[max(1, 2, 3, $sysmis)], [3.00]],
593   [[max.4(1, 2, 3, $sysmis)], [sysmis]],
594   [[max.4(1, 2, 3)], [error],
595    [error: DEBUG EVALUATE: With MAX(number[, number]...), using minimum valid argument count of 4 does not make sense when passing only 3 arguments in list.]],
596
597   [[max("2", "3", "5", "1", "4")], ["5"]],
598   [[max("1", "2")], ["2"]],
599   [[max("1")], ["1"]],
600
601   [[min(1, 2, 3, 4, 5)], [1.00]],
602   [[min(1, $sysmis, 2, 3, $sysmis, 4, 5)], [1.00]],
603   [[min(1, 2)], [1.00]],
604   [[min()], [error],
605    [error: DEBUG EVALUATE: Function invocation min() does not match any known function.  Candidates are:
606 MIN(number[, number]...)
607 MIN(string[, string]...).]],
608   [[min(1)], [1.00]],
609   [[min(1, $sysmis)], [1.00]],
610   [[min(1, 2, 3, $sysmis)], [1.00]],
611   [[min.4(1, 2, 3, $sysmis)], [sysmis]],
612   [[min.4(1, 2, 3)], [error],
613    [error: DEBUG EVALUATE: With MIN(number[, number]...), using minimum valid argument count of 4 does not make sense when passing only 3 arguments in list.]],
614
615   [[min("2", "3", "5", "1", "4")], ["1"]],
616   [[min("1", "2")], ["1"]],
617   [[min("1")], ["1"]])
618
619 CHECK_EXPR_EVAL([cfvar mean sd sum variance],
620   [[cfvar(1, 2, 3, 4, 5)], [0.53]],
621   [[cfvar(1, $sysmis, 2, 3, $sysmis, 4, 5)], [0.53]],
622   [[cfvar(1, 2)], [0.47]],
623   [[cfvar(1)], [error],
624    [error: DEBUG EVALUATE: Type mismatch invoking CFVAR(number, number[, number]...) as cfvar(number).]],
625   [[cfvar(1, $sysmis)], [sysmis]],
626   [[cfvar(1, 2, 3, $sysmis)], [0.50]],
627   [[cfvar.4(1, 2, 3, $sysmis)], [sysmis]],
628   [[cfvar.4(1, 2, 3)], [error],
629    [error: DEBUG EVALUATE: With CFVAR(number, number[, number]...), using minimum valid argument count of 4 does not make sense when passing only 3 arguments in list.]],
630   [[cfvar('x')], [error],
631    [error: DEBUG EVALUATE: Type mismatch invoking CFVAR(number, number[, number]...) as cfvar(string).]],
632   [[cfvar('x', 1, 2, 3)], [error],
633    [error: DEBUG EVALUATE: Type mismatch invoking CFVAR(number, number[, number]...) as cfvar(string, number, number, number).]],
634
635   [[mean(1, 2, 3, 4, 5)], [3.00]],
636   [[mean(1, $sysmis, 2, 3, $sysmis, 4, 5)], [3.00]],
637   [[mean(1, 2)], [1.50]],
638   [[mean()], [error],
639    [error: DEBUG EVALUATE: Type mismatch invoking MEAN(number[, number]...) as mean().]],
640   [[mean(1)], [1.00]],
641   [[mean(1, $sysmis)], [1.00]],
642   [[mean(1, 2, 3, $sysmis)], [2.00]],
643   [[mean.4(1, 2, 3, $sysmis)], [sysmis]],
644   [[mean.4(1, 2, 3)], [error],
645    [error: DEBUG EVALUATE: With MEAN(number[, number]...), using minimum valid argument count of 4 does not make sense when passing only 3 arguments in list.]],
646
647
648   [[sd(1, 2, 3, 4, 5)], [1.58]],
649   [[sd(1, $sysmis, 2, 3, $sysmis, 4, 5)], [1.58]],
650   [[sd(1, 2)], [0.71]],
651   [[sd(1)], [error],
652    [error: DEBUG EVALUATE: Type mismatch invoking SD(number, number[, number]...) as sd(number).]],
653   [[sd(1, $sysmis)], [sysmis]],
654   [[sd(1, 2, 3, $sysmis)], [1.00]],
655   [[sd.4(1, 2, 3, $sysmis)], [sysmis]],
656   [[sd.4(1, 2, 3)], [error],
657    [error: DEBUG EVALUATE: With SD(number, number[, number]...), using minimum valid argument count of 4 does not make sense when passing only 3 arguments in list.]],
658   [[sd('x')], [error],
659    [error: DEBUG EVALUATE: Type mismatch invoking SD(number, number[, number]...) as sd(string).]],
660   [[sd('x', 1, 2, 3)], [error],
661    [error: DEBUG EVALUATE: Type mismatch invoking SD(number, number[, number]...) as sd(string, number, number, number).]],
662
663   [[sum(1, 2, 3, 4, 5)], [15.00]],
664   [[sum(1, $sysmis, 2, 3, $sysmis, 4, 5)], [15.00]],
665   [[sum(1, 2)], [3.00]],
666   [[sum()], [error],
667    [error: DEBUG EVALUATE: Type mismatch invoking SUM(number[, number]...) as sum().]],
668   [[sum(1)], [1.00]],
669   [[sum(1, $sysmis)], [1.00]],
670   [[sum(1, 2, 3, $sysmis)], [6.00]],
671   [[sum.4(1, 2, 3, $sysmis)], [sysmis]],
672   [[sum.4(1, 2, 3)], [error],
673    [error: DEBUG EVALUATE: With SUM(number[, number]...), using minimum valid argument count of 4 does not make sense when passing only 3 arguments in list.]],
674
675   [[variance(1, 2, 3, 4, 5)], [2.50]],
676   [[variance(1, $sysmis, 2, 3, $sysmis, 4, 5)], [2.50]],
677   [[variance(1, 2)], [0.50]],
678   [[variance(1)], [error],
679    [error: DEBUG EVALUATE: Type mismatch invoking VARIANCE(number, number[, number]...) as variance(number).]],
680   [[variance(1, $sysmis)], [sysmis]],
681   [[variance(1, 2, 3, $sysmis)], [1.00]],
682   [[variance.4(1, 2, 3, $sysmis)], [sysmis]],
683   [[variance.4(1, 2, 3)], [error],
684    [error: DEBUG EVALUATE: With VARIANCE(number, number[, number]...), using minimum valid argument count of 4 does not make sense when passing only 3 arguments in list.]],
685   [[variance('x')], [error],
686    [error: DEBUG EVALUATE: Type mismatch invoking VARIANCE(number, number[, number]...) as variance(string).]],
687   [[variance('x', 1, 2, 3)], [error],
688    [error: DEBUG EVALUATE: Type mismatch invoking VARIANCE(number, number[, number]...) as variance(string, number, number, number).]])
689
690 CHECK_EXPR_EVAL([concat index rindex length lower],
691   [[concat('')], [""]],
692   [[concat('a', 'b')], ["ab"]],
693   [[concat('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h')], ["abcdefgh"]],
694   [[concat('abcdefgh', 'ijklmnopq')], ["abcdefghijklmnopq"]],
695   [[concat('a', 1)], [error],
696    [error: DEBUG EVALUATE: Type mismatch invoking CONCAT(string[, string]...) as concat(string, number).]],
697   [[concat(1, 2)], [error],
698    [error: DEBUG EVALUATE: Type mismatch invoking CONCAT(string[, string]...) as concat(number, number).]],
699
700   [[index('abcbcde', 'bc')], [2.00]],
701   [[index('abcbcde', 'bcd')], [4.00]],
702   [[index('abcbcde', 'bcbc')], [2.00]],
703   [[index('abcdefgh', 'abc')], [1.00]],
704   [[index('abcdefgh', 'bcd')], [2.00]],
705   [[index('abcdefgh', 'cde')], [3.00]],
706   [[index('abcdefgh', 'def')], [4.00]],
707   [[index('abcdefgh', 'efg')], [5.00]],
708   [[index('abcdefgh', 'fgh')], [6.00]],
709   [[index('abcdefgh', 'fghi')], [0.00]],
710   [[index('abcdefgh', 'x')], [0.00]],
711   [[index('abcdefgh', 'abch')], [0.00]],
712   [[index('banana', 'na')], [3.00]],
713   [[index('banana', 'ana')], [2.00]],
714   [[index('', 'x')], [0.00]],
715   [[index('', '')], [sysmis]],
716   [[index('abcdefgh', '')], [sysmis]],
717   [[index('abcdefgh', 'alkjsfdjlskalkjfa')], [0.00]],
718
719   [[index('abcbcde', 'bc', 1)], [2.00]],
720   [[index('abcbcde', 'dc', 1)], [3.00]],
721   [[index('abcbcde', 'abc', 1)], [1.00]],
722   [[index('abcbcde', 'bc', 2)], [2.00]],
723   [[index('abcbcde', 'dc', 2)], [0.00]],
724   [[index('abcbcde', 'abc', 1)], [1.00]],
725   [[index('abcbcde', 'bccb', 2)], [2.00]],
726   [[index('abcbcde', 'bcbc', 2)], [2.00]],
727   [[index('abcbcde', 'bcbc', $sysmis)], [sysmis]],
728
729   [[rindex('abcbcde', 'bc')], [4.00]],
730   [[rindex('abcbcde', 'bcd')], [4.00]],
731   [[rindex('abcbcde', 'bcbc')], [2.00]],
732   [[rindex('abcdefgh', 'abc')], [1.00]],
733   [[rindex('abcdefgh', 'bcd')], [2.00]],
734   [[rindex('abcdefgh', 'cde')], [3.00]],
735   [[rindex('abcdefgh', 'def')], [4.00]],
736   [[rindex('abcdefgh', 'efg')], [5.00]],
737   [[rindex('abcdefgh', 'fgh')], [6.00]],
738   [[rindex('abcdefgh', 'fghi')], [0.00]],
739   [[rindex('abcdefgh', 'x')], [0.00]],
740   [[rindex('abcdefgh', 'abch')], [0.00]],
741   [[rindex('banana', 'na')], [5.00]],
742   [[rindex('banana', 'ana')], [4.00]],
743   [[rindex('', 'x')], [0.00]],
744   [[rindex('', '')], [sysmis]],
745   [[rindex('abcdefgh', '')], [sysmis]],
746   [[rindex('abcdefgh', 'alkjsfdjlskalkjfa')], [0.00]],
747
748   [[rindex('abcbcde', 'bc', 1)], [5.00]],
749   [[rindex('abcbcde', 'dc', 1)], [6.00]],
750   [[rindex('abcbcde', 'abc', 1)], [5.00]],
751   [[rindex('abcbcde', 'bc', 2)], [4.00]],
752   [[rindex('abcbcde', 'dc', 2)], [0.00]],
753   [[rindex('abcbcde', 'abc', 1)], [5.00]],
754   [[rindex('abcbcde', 'bccb', 2)], [4.00]],
755   [[rindex('abcbcde', 'bcbc', 2)], [4.00]],
756   [[rindex('abcbcde', 'bcbc', $sysmis)], [sysmis]],
757   [[rindex('abcbcde', 'bcbcg', 2)], [sysmis]],
758   [[rindex('abcbcde', 'bcbcg', $sysmis)], [sysmis]],
759   [[rindex('abcbcde', 'bcbcg', 'x')], [error],
760    [error: DEBUG EVALUATE: Function invocation rindex(string, string, string) does not match any known function.  Candidates are:
761 RINDEX(string, string)
762 RINDEX(string, string, number).]],
763   [[rindex(1, 'bcdfkjl', 2)], [error],
764    [error: DEBUG EVALUATE: Function invocation rindex(number, string, number) does not match any known function.  Candidates are:
765 RINDEX(string, string)
766 RINDEX(string, string, number).]],
767   [[rindex('aksj', 2, 2)], [error],
768    [error: DEBUG EVALUATE: Function invocation rindex(string, number, number) does not match any known function.  Candidates are:
769 RINDEX(string, string)
770 RINDEX(string, string, number).]],
771   [[rindex(1, 2, 3)], [error],
772    [error: DEBUG EVALUATE: Function invocation rindex(number, number, number) does not match any known function.  Candidates are:
773 RINDEX(string, string)
774 RINDEX(string, string, number).]],
775   [[rindex(1, 2, '3')], [error],
776    [error: DEBUG EVALUATE: Function invocation rindex(number, number, string) does not match any known function.  Candidates are:
777 RINDEX(string, string)
778 RINDEX(string, string, number).]],
779
780   [[length('')], [0.00]],
781   [[length('a')], [1.00]],
782   [[length('xy')], [2.00]],
783   [[length('adsf    ')], [8.00]],
784   [[length('abcdefghijkl')], [12.00]],
785   [[length(0)], [error],
786    [error: DEBUG EVALUATE: Type mismatch invoking LENGTH(string) as length(number).]],
787   [[length($sysmis)], [error],
788    [error: DEBUG EVALUATE: Type mismatch invoking LENGTH(string) as length(number).]],
789
790   [[lower('ABCDEFGHIJKLMNOPQRSTUVWXYZ!@%&*089')], ["abcdefghijklmnopqrstuvwxyz!@%&*089"]],
791   [[lower('')], [""]],
792   [[lower(1)], [error],
793    [error: DEBUG EVALUATE: Type mismatch invoking LOWER(string) as lower(number).]])
794
795 CHECK_EXPR_EVAL([lpad number ltrim lpad rtrim rpad string substr upcase],
796   [[lpad('abc', -1)], [""]],
797   [[lpad('abc', 0)], ["abc"]],
798   [[lpad('abc', 2)], ["abc"]],
799   [[lpad('abc', 3)], ["abc"]],
800   [[lpad('abc', 10)], ["       abc"]],
801   [[lpad('abc', 32768)], [""]],
802   [[lpad('abc', $sysmis)], [""]],
803   [[lpad('abc', -1, '*')], [""]],
804   [[lpad('abc', 0, '*')], ["abc"]],
805   [[lpad('abc', 2, '*')], ["abc"]],
806   [[lpad('abc', 3, '*')], ["abc"]],
807   [[lpad('abc', 10, '*')], ["*******abc"]],
808   [[lpad('abc', 32768, '*')], [""]],
809   [[lpad('abc', $sysmis, '*')], [""]],
810   [[lpad('abc', $sysmis, '')], [""]],
811   [[lpad('abc', $sysmis, 'xy')], [""]],
812   [[lpad(0, 10)], [error],
813    [error: DEBUG EVALUATE: Function invocation lpad(number, number) does not match any known function.  Candidates are:
814 LPAD(string, number)
815 LPAD(string, number, string).]],
816   [[lpad('abc', 'def')], [error],
817    [error: DEBUG EVALUATE: Function invocation lpad(string, string) does not match any known function.  Candidates are:
818 LPAD(string, number)
819 LPAD(string, number, string).]],
820   [[lpad(0, 10, ' ')], [error],
821    [error: DEBUG EVALUATE: Function invocation lpad(number, number, string) does not match any known function.  Candidates are:
822 LPAD(string, number)
823 LPAD(string, number, string).]],
824   [[lpad('abc', 'def', ' ')], [error],
825    [error: DEBUG EVALUATE: Function invocation lpad(string, string, string) does not match any known function.  Candidates are:
826 LPAD(string, number)
827 LPAD(string, number, string).]],
828   [[lpad('x', 5, 0)], [error],
829    [error: DEBUG EVALUATE: Function invocation lpad(string, number, number) does not match any known function.  Candidates are:
830 LPAD(string, number)
831 LPAD(string, number, string).]],
832   [[lpad('x', 5, 2)], [error],
833    [error: DEBUG EVALUATE: Function invocation lpad(string, number, number) does not match any known function.  Candidates are:
834 LPAD(string, number)
835 LPAD(string, number, string).]],
836
837   [[number("123", f3.0)], [123.00]],
838   [[number(" 123", f3.0)], [12.00]],
839   [[number("123", f3.1)], [12.30]],
840   [[number("   ", f3.1)], [sysmis]],
841   [[number("123", a8)], [error],
842    [error: DEBUG EVALUATE: Type mismatch invoking NUMBER(string, num_input_format) as number(string, format).]],
843 dnl CCA is not an input format:
844   [[number("123", cca1.2)], [error],
845    [error: DEBUG EVALUATE: Type mismatch invoking NUMBER(string, num_input_format) as number(string, format).]],
846
847   [[ltrim('   abc')], ["abc"]],
848   [[rtrim('   abc   ')], ["   abc"]],
849   [[ltrim('abc')], ["abc"]],
850   [[ltrim('     abc')], ["      abc"]],
851   [[ltrim('    ')], [""]],
852   [[ltrim('')], [""]],
853   [[ltrim(8)], [error],
854    [error: DEBUG EVALUATE: Function invocation ltrim(number) does not match any known function.  Candidates are:
855 LTRIM(string)
856 LTRIM(string, string).]],
857   [[ltrim('***abc', '*')], ["abc"]],
858   [[ltrim('abc', '*')], ["abc"]],
859   [[ltrim('*abc', '*')], ["abc"]],
860   [[ltrim('', '*')], [""]],
861   [[ltrim(8, '*')], [error],
862    [error: DEBUG EVALUATE: Function invocation ltrim(number, string) does not match any known function.  Candidates are:
863 LTRIM(string)
864 LTRIM(string, string).]],
865   [[ltrim(' x', 8)], [error],
866    [error: DEBUG EVALUATE: Function invocation ltrim(string, number) does not match any known function.  Candidates are:
867 LTRIM(string)
868 LTRIM(string, string).]],
869   [[ltrim(8, 9)], [error],
870    [error: DEBUG EVALUATE: Function invocation ltrim(number, number) does not match any known function.  Candidates are:
871 LTRIM(string)
872 LTRIM(string, string).]],
873
874   [[rpad('abc', -1)], [""]],
875   [[rpad('abc', 0)], ["abc"]],
876   [[rpad('abc', 2)], ["abc"]],
877   [[rpad('abc', 3)], ["abc"]],
878   [[rpad('abc', 10)], ["abc       "]],
879   [[rpad('abc', 32768)], [""]],
880   [[rpad('abc', $sysmis)], [""]],
881   [[rpad('abc', -1, '*')], [""]],
882   [[rpad('abc', 0, '*')], ["abc"]],
883   [[rpad('abc', 2, '*')], ["abc"]],
884   [[rpad('abc', 3, '*')], ["abc"]],
885   [[rpad('abc', 10, '*')], ["abc*******"]],
886   [[rpad('abc', 32768, '*')], [""]],
887   [[rpad('abc', $sysmis, '*')], [""]],
888   [[rpad('abc', $sysmis, '')], [""]],
889   [[rpad('abc', $sysmis, 'xy')], [""]],
890   [[rpad(0, 10)], [error],
891    [error: DEBUG EVALUATE: Function invocation rpad(number, number) does not match any known function.  Candidates are:
892 RPAD(string, number)
893 RPAD(string, number, string).]],
894   [[rpad('abc', 'def')], [error],
895    [error: DEBUG EVALUATE: Function invocation rpad(string, string) does not match any known function.  Candidates are:
896 RPAD(string, number)
897 RPAD(string, number, string).]],
898   [[rpad(0, 10, ' ')], [error],
899    [error: DEBUG EVALUATE: Function invocation rpad(number, number, string) does not match any known function.  Candidates are:
900 RPAD(string, number)
901 RPAD(string, number, string).]],
902   [[rpad('abc', 'def', ' ')], [error],
903    [error: DEBUG EVALUATE: Function invocation rpad(string, string, string) does not match any known function.  Candidates are:
904 RPAD(string, number)
905 RPAD(string, number, string).]],
906   [[rpad('x', 5, 0)], [error],
907    [error: DEBUG EVALUATE: Function invocation rpad(string, number, number) does not match any known function.  Candidates are:
908 RPAD(string, number)
909 RPAD(string, number, string).]],
910   [[rpad('x', 5, 2)], [error],
911    [error: DEBUG EVALUATE: Function invocation rpad(string, number, number) does not match any known function.  Candidates are:
912 RPAD(string, number)
913 RPAD(string, number, string).]],
914
915   [[rtrim('abc   ')], ["abc"]],
916   [[rtrim('   abc   ')], ["   abc"]],
917   [[rtrim('abc')], ["abc"]],
918   [[rtrim('abc  ')], ["abc      "]],
919   [[rtrim('    ')], [""]],
920   [[rtrim('')], [""]],
921   [[rtrim(8)], [error],
922    [error: DEBUG EVALUATE: Function invocation rtrim(number) does not match any known function.  Candidates are:
923 RTRIM(string)
924 RTRIM(string, string).]],
925   [[rtrim('abc***', '*')], ["abc"]],
926   [[rtrim('abc', '*')], ["abc"]],
927   [[rtrim('abc*', '*')], ["abc"]],
928   [[rtrim('', '*')], [""]],
929   [[rtrim(8, '*')], [error],
930    [error: DEBUG EVALUATE: Function invocation rtrim(number, string) does not match any known function.  Candidates are:
931 RTRIM(string)
932 RTRIM(string, string).]],
933   [[rtrim(' x', 8)], [error],
934    [error: DEBUG EVALUATE: Function invocation rtrim(string, number) does not match any known function.  Candidates are:
935 RTRIM(string)
936 RTRIM(string, string).]],
937   [[rtrim(8, 9)], [error],
938    [error: DEBUG EVALUATE: Function invocation rtrim(number, number) does not match any known function.  Candidates are:
939 RTRIM(string)
940 RTRIM(string, string).]],
941
942   [[string(123.56, f5.1)], ["123.6"]],
943   [[string($sysmis, f5.1)], ["   . "]],
944   [[string("abc", A5)], [error],
945    [error: DEBUG EVALUATE: Type mismatch invoking STRING(number, num_output_format) as string(string, format).]],
946 dnl E has a minimum width of 6 on output:
947   [[string(123, e1)], [error],
948    [error: DEBUG EVALUATE: Type mismatch invoking STRING(number, num_output_format) as string(number, format).]],
949   [[string(123, e6.0)], ["1E+002"]],
950
951   [[substr('abcdefgh', -5)], [""]],
952   [[substr('abcdefgh', 0)], [""]],
953   [[substr('abcdefgh', 1)], ["abcdefgh"]],
954   [[substr('abcdefgh', 3)], ["cdefgh"]],
955   [[substr('abcdefgh', 5)], ["efgh"]],
956   [[substr('abcdefgh', 6)], ["fgh"]],
957   [[substr('abcdefgh', 7)], ["gh"]],
958   [[substr('abcdefgh', 8)], ["h"]],
959   [[substr('abcdefgh', 9)], [""]],
960   [[substr('abcdefgh', 10)], [""]],
961   [[substr('abcdefgh', 20)], [""]],
962   [[substr('abcdefgh', $sysmis)], [""]],
963   [[substr(0, 10)], [error],
964    [error: DEBUG EVALUATE: Function invocation substr(number, number) does not match any known function.  Candidates are:
965 SUBSTR(string, number)
966 SUBSTR(string, number, number).]],
967   [[substr('abcd', 'abc')], [error],
968    [error: DEBUG EVALUATE: Function invocation substr(string, string) does not match any known function.  Candidates are:
969 SUBSTR(string, number)
970 SUBSTR(string, number, number).]],
971   [[substr(0, 'abc')], [error],
972    [error: DEBUG EVALUATE: Function invocation substr(number, string) does not match any known function.  Candidates are:
973 SUBSTR(string, number)
974 SUBSTR(string, number, number).]],
975
976   [[substr('abcdefgh', 0, 0)], [""]],
977   [[substr('abcdefgh', 3, 0)], [""]],
978   [[substr('abcdefgh', 5, 0)], [""]],
979   [[substr('abcdefgh', 9, 0)], [""]],
980   [[substr('abcdefgh', 0, 1)], [""]],
981   [[substr('abcdefgh', 0, 5)], [""]],
982   [[substr('abcdefgh', 1, 8)], ["abcdefgh"]],
983   [[substr('abcdefgh', 1, 10)], ["abcdefgh"]],
984   [[substr('abcdefgh', 1, 20)], ["abcdefgh"]],
985   [[substr('abcdefgh', 3, 4)], ["cdef"]],
986   [[substr('abcdefgh', 5, 2)], ["ef"]],
987   [[substr('abcdefgh', 6, 1)], ["f"]],
988   [[substr('abcdefgh', 7, 10)], ["gh"]],
989   [[substr('abcdefgh', 8, 1)], ["h"]],
990   [[substr('abcdefgh', 8, 2)], ["h"]],
991   [[substr('abcdefgh', 9, 11)], [""]],
992   [[substr('abcdefgh', 10, 52)], [""]],
993   [[substr('abcdefgh', 20, 1)], [""]],
994   [[substr('abcdefgh', $sysmis, 2)], [""]],
995   [[substr('abcdefgh', 9, $sysmis)], [""]],
996   [[substr('abcdefgh', $sysmis, $sysmis)], [""]],
997   [[substr('abc', 1, 'x')], [error],
998    [error: DEBUG EVALUATE: Function invocation substr(string, number, string) does not match any known function.  Candidates are:
999 SUBSTR(string, number)
1000 SUBSTR(string, number, number).]],
1001   [[substr(0, 10, 1)], [error],
1002    [error: DEBUG EVALUATE: Function invocation substr(number, number, number) does not match any known function.  Candidates are:
1003 SUBSTR(string, number)
1004 SUBSTR(string, number, number).]],
1005   [[substr(0, 10, 'x')], [error],
1006    [error: DEBUG EVALUATE: Function invocation substr(number, number, string) does not match any known function.  Candidates are:
1007 SUBSTR(string, number)
1008 SUBSTR(string, number, number).]],
1009   [[substr('abcd', 'abc', 0)], [error],
1010    [error: DEBUG EVALUATE: Function invocation substr(string, string, number) does not match any known function.  Candidates are:
1011 SUBSTR(string, number)
1012 SUBSTR(string, number, number).]],
1013   [[substr('abcd', 'abc', 'j')], [error],
1014    [error: DEBUG EVALUATE: Function invocation substr(string, string, string) does not match any known function.  Candidates are:
1015 SUBSTR(string, number)
1016 SUBSTR(string, number, number).]],
1017   [[substr(0, 'abc', 4)], [error],
1018    [error: DEBUG EVALUATE: Function invocation substr(number, string, number) does not match any known function.  Candidates are:
1019 SUBSTR(string, number)
1020 SUBSTR(string, number, number).]],
1021   [[substr(0, 'abc', 'k')], [error],
1022    [error: DEBUG EVALUATE: Function invocation substr(number, string, string) does not match any known function.  Candidates are:
1023 SUBSTR(string, number)
1024 SUBSTR(string, number, number).]],
1025
1026   [[upcase('abcdefghijklmnopqrstuvwxyz!@%&*089')], ["ABCDEFGHIJKLMNOPQRSTUVWXYZ!@%&*089"]],
1027   [[upcase('')], [""]],
1028   [[upcase(1)], [error],
1029    [error: DEBUG EVALUATE: Type mismatch invoking UPCASE(string) as upcase(number).]])
1030
1031 CHECK_EXPR_EVAL([time ctime date yrmoda],
1032   [[time.days(1)], [86400.00]],
1033   [[time.days(-1)], [-86400.00]],
1034   [[time.days(0.5)], [43200.00]],
1035   [[time.days('x')], [error],
1036    [error: DEBUG EVALUATE: Type mismatch invoking TIME.DAYS(number) as time.days(string).]],
1037   [[time.days($sysmis)], [sysmis]],
1038
1039   [[time.hms(4,50,38)], [17438.00]],
1040   [[time.hms(12,31,35)], [45095.00]],
1041   [[time.hms(12,47,53)], [46073.00]],
1042   [[time.hms(1,26,0)], [5160.00]],
1043   [[time.hms(20,58,11)], [75491.00]],
1044   [[time.hms(7,36,5)], [27365.00]],
1045   [[time.hms(15,43,49)], [56629.00]],
1046   [[time.hms(4,25,9)], [15909.00]],
1047   [[time.hms(6,49,27)], [24567.00]],
1048   [[time.hms(2,57,52)], [10672.00]],
1049   [[time.hms(16,45,44)], [60344.00]],
1050   [[time.hms(21,30,57)], [77457.00]],
1051   [[time.hms(22,30,4)], [81004.00]],
1052   [[time.hms(1,56,51)], [7011.00]],
1053   [[time.hms(5, 6, 7)], [18367.00]],
1054   [[time.hms(5, 6, 0)], [18360.00]],
1055   [[time.hms(5, 0, 7)], [18007.00]],
1056   [[time.hms(0, 6, 7)], [367.00]],
1057   [[time.hms(-5, 6, -7)], [sysmis],
1058    [warning: DEBUG EVALUATE: TIME.HMS cannot mix positive and negative arguments.]],
1059   [[time.hms(-5, 5, -7)], [sysmis],
1060    [warning: DEBUG EVALUATE: TIME.HMS cannot mix positive and negative arguments.]],
1061   [[time.hms($sysmis, 6, 7)], [sysmis]],
1062   [[time.hms(5, $sysmis, 7)], [sysmis]],
1063   [[time.hms(5, $sysmis, 7)], [sysmis]],
1064   [[time.hms($sysmis, $sysmis, 7)], [sysmis]],
1065   [[time.hms(5, $sysmis, $sysmis)], [sysmis]],
1066   [[time.hms($sysmis, $sysmis, 7)], [sysmis]],
1067   [[time.hms($sysmis, $sysmis, $sysmis)], [sysmis]],
1068
1069   [[ctime.days(106272)], [1.23]],
1070   [[ctime.hours(106272)], [29.52]],
1071   [[ctime.minutes(106272)], [1771.20]],
1072   [[ctime.seconds(106272)], [106272.00]],
1073   [[ctime.days(-106272)], [-1.23]],
1074   [[ctime.hours(-106272)], [-29.52]],
1075   [[ctime.minutes(-106272)], [-1771.20]],
1076   [[ctime.seconds(-106272)], [-106272.00]],
1077   [[ctime.days($sysmis)], [sysmis]],
1078   [[ctime.hours($sysmis)], [sysmis]],
1079   [[ctime.minutes($sysmis)], [sysmis]],
1080   [[ctime.seconds($sysmis)], [sysmis]],
1081   [[ctime.days('a')], [error],
1082    [error: DEBUG EVALUATE: Type mismatch invoking CTIME.DAYS(number) as ctime.days(string).]],
1083   [[ctime.hours('b')], [error],
1084    [error: DEBUG EVALUATE: Type mismatch invoking CTIME.HOURS(number) as ctime.hours(string).]],
1085   [[ctime.minutes('c')], [error],
1086    [error: DEBUG EVALUATE: Type mismatch invoking CTIME.MINUTES(number) as ctime.minutes(string).]],
1087   [[ctime.seconds('d')], [error],
1088    [error: DEBUG EVALUATE: Type mismatch invoking CTIME.SECONDS(number) as ctime.seconds(string).]],
1089
1090   [[ctime.days(date.dmy(15,10,1582))], [1.00]],
1091   [[ctime.days(date.dmy(6,9,1719))], [50000.00]],
1092   [[ctime.days(date.dmy(24,1,1583))], [102.00]],
1093   [[ctime.days(date.dmy(14,12,1585))], [1157.00]],
1094   [[ctime.days(date.dmy(26,11,1621))], [14288.00]],
1095   [[ctime.days(date.dmy(25,12,1821))], [87365.00]],
1096   [[ctime.days(date.dmy(3,12,1882))], [109623.00]],
1097   [[ctime.days(date.dmy(6,4,2002))], [153211.00]],
1098   [[ctime.days(date.dmy(19,12,1999))], [152372.00]],
1099   [[ctime.days(date.dmy(1,10,1978))], [144623.00]],
1100   [[ctime.days(date.dmy(0,10,1978))], [144622.00]],
1101   [[ctime.days(date.dmy(32,10,1978))], [sysmis],
1102    [error: DEBUG EVALUATE: Day 32 is not in acceptable range of 0 to 31.]],
1103   [[ctime.days(date.dmy(31,0,1978))], [144349.00]],
1104   [[ctime.days(date.dmy(31,13,1978))], [144745.00]],
1105   [[ctime.days(date.dmy($sysmis,10,1978))], [sysmis]],
1106   [[ctime.days(date.dmy(31,$sysmis,1978))], [sysmis]],
1107   [[ctime.days(date.dmy(31,10,$sysmis))], [sysmis]],
1108   [[ctime.days(date.dmy($sysmis,$sysmis,1978))], [sysmis]],
1109   [[ctime.days(date.dmy(31,$sysmis,$sysmis))], [sysmis]],
1110   [[ctime.days(date.dmy($sysmis,10,$sysmis))], [sysmis]],
1111   [[ctime.days(date.dmy($sysmis,$sysmis,$sysmis))], [sysmis]],
1112   [[date.dmy('a',1,2)], [error],
1113    [error: DEBUG EVALUATE: Type mismatch invoking DATE.DMY(number, number, number) as date.dmy(string, number, number).]],
1114   [[date.dmy(1,'a',2)], [error],
1115    [error: DEBUG EVALUATE: Type mismatch invoking DATE.DMY(number, number, number) as date.dmy(number, string, number).]],
1116   [[date.dmy(1,2,'a')], [error],
1117    [error: DEBUG EVALUATE: Type mismatch invoking DATE.DMY(number, number, number) as date.dmy(number, number, string).]],
1118 dnl FIXME: check out-of-range and nearly out-of-range values
1119 dnl
1120   [[yrmoda(1582,10,15)], [1.00]],
1121   [[yrmoda(1719,9,6)], [50000.00]],
1122   [[yrmoda(1583,1,24)], [102.00]],
1123   [[yrmoda(1585,12,14)], [1157.00]],
1124   [[yrmoda(1621,11,26)], [14288.00]],
1125   [[yrmoda(1821,12,25)], [87365.00]],
1126   [[yrmoda(1882,12,3)], [109623.00]],
1127   [[yrmoda(2002,4,6)], [153211.00]],
1128   [[yrmoda(1999,12,19)], [152372.00]],
1129   [[yrmoda(1978,10,1)], [144623.00]],
1130   [[yrmoda(1978,10,0)], [144622.00]],
1131   [[yrmoda(1978,10,32)], [sysmis],
1132    [error: DEBUG EVALUATE: Day 32 is not in acceptable range of 0 to 31.]],
1133   [[yrmoda(1978,0,31)], [144349.00]],
1134   [[yrmoda(1978,13,31)], [144745.00]],
1135   [[yrmoda(1978,10,$sysmis)], [sysmis]],
1136   [[yrmoda(1978,$sysmis,31)], [sysmis]],
1137   [[yrmoda($sysmis,10,31)], [sysmis]],
1138   [[yrmoda(1978,$sysmis,$sysmis)], [sysmis]],
1139   [[yrmoda($sysmis,$sysmis,31)], [sysmis]],
1140   [[yrmoda($sysmis,10,$sysmis)], [sysmis]],
1141   [[yrmoda($sysmis,$sysmis,$sysmis)], [sysmis]],
1142   [[yrmoda('a',1,2)], [error],
1143    [error: DEBUG EVALUATE: Type mismatch invoking YRMODA(number, number, number) as yrmoda(string, number, number).]],
1144   [[yrmoda(1,'a',2)], [error],
1145    [error: DEBUG EVALUATE: Type mismatch invoking YRMODA(number, number, number) as yrmoda(number, string, number).]],
1146   [[yrmoda(1,2,'a')], [error],
1147    [error: DEBUG EVALUATE: Type mismatch invoking YRMODA(number, number, number) as yrmoda(number, number, string).]],
1148 dnl FIXME: check out-of-range and nearly out-of-range values
1149 dnl
1150   [[ctime.days(date.mdy(6,10,1648)) + 577735], [601716.00]],
1151   [[ctime.days(date.mdy(6,30,1680)) + 577735], [613424.00]],
1152   [[ctime.days(date.mdy(7,24,1716)) + 577735], [626596.00]],
1153   [[ctime.days(date.mdy(6,19,1768)) + 577735], [645554.00]],
1154   [[ctime.days(date.mdy(8,2,1819)) + 577735], [664224.00]],
1155   [[ctime.days(date.mdy(3,27,1839)) + 577735], [671401.00]],
1156   [[ctime.days(date.mdy(4,19,1903)) + 577735], [694799.00]],
1157   [[ctime.days(date.mdy(8,25,1929)) + 577735], [704424.00]],
1158   [[ctime.days(date.mdy(9,29,1941)) + 577735], [708842.00]],
1159   [[ctime.days(date.mdy(4,19,1943)) + 577735], [709409.00]],
1160   [[ctime.days(date.mdy(10,7,1943)) + 577735], [709580.00]],
1161   [[ctime.days(date.mdy(3,17,1992)) + 577735], [727274.00]],
1162   [[ctime.days(date.mdy(2,25,1996)) + 577735], [728714.00]],
1163   [[ctime.days(date.mdy(11,10,2038)) + 577735], [744313.00]],
1164   [[ctime.days(date.mdy(7,18,2094)) + 577735], [764652.00]],
1165 dnl FIXME: check out-of-range and nearly out-of-range values
1166 dnl
1167   [[ctime.days(date.mdy(10,15,1582))], [1.00]],
1168   [[ctime.days(date.mdy(9,6,1719))], [50000.00]],
1169   [[ctime.days(date.mdy(1,24,1583))], [102.00]],
1170   [[ctime.days(date.mdy(12,14,1585))], [1157.00]],
1171   [[ctime.days(date.mdy(11,26,1621))], [14288.00]],
1172   [[ctime.days(date.mdy(12,25,1821))], [87365.00]],
1173   [[ctime.days(date.mdy(12,3,1882))], [109623.00]],
1174   [[ctime.days(date.mdy(4,6,2002))], [153211.00]],
1175   [[ctime.days(date.mdy(12,19,1999))], [152372.00]],
1176   [[ctime.days(date.mdy(10,1,1978))], [144623.00]],
1177   [[ctime.days(date.mdy(10,0,1978))], [144622.00]],
1178   [[ctime.days(date.mdy(10,32,1978))], [sysmis],
1179    [error: DEBUG EVALUATE: Day 32 is not in acceptable range of 0 to 31.]],
1180   [[ctime.days(date.mdy(0,31,1978))], [144349.00]],
1181   [[ctime.days(date.mdy(13,31,1978))], [144745.00]],
1182   [[ctime.days(date.mdy(10,$sysmis,1978))], [sysmis]],
1183   [[ctime.days(date.mdy($sysmis,31,1978))], [sysmis]],
1184   [[ctime.days(date.mdy(10,31,$sysmis))], [sysmis]],
1185   [[ctime.days(date.mdy($sysmis,$sysmis,1978))], [sysmis]],
1186   [[ctime.days(date.mdy($sysmis,31,$sysmis))], [sysmis]],
1187   [[ctime.days(date.mdy(10,$sysmis,$sysmis))], [sysmis]],
1188   [[ctime.days(date.mdy($sysmis,$sysmis,$sysmis))], [sysmis]],
1189   [[date.mdy('a',1,2)], [error],
1190    [error: DEBUG EVALUATE: Type mismatch invoking DATE.MDY(number, number, number) as date.mdy(string, number, number).]],
1191   [[date.mdy(1,'a',2)], [error],
1192    [error: DEBUG EVALUATE: Type mismatch invoking DATE.MDY(number, number, number) as date.mdy(number, string, number).]],
1193   [[date.mdy(1,2,'a')], [error],
1194    [error: DEBUG EVALUATE: Type mismatch invoking DATE.MDY(number, number, number) as date.mdy(number, number, string).]],
1195   [[ctime.days(date.mdy(0,0,0))], [152353.00]],
1196   [[ctime.days(date.mdy(0,0,999))], [sysmis],
1197    [error: DEBUG EVALUATE: Date 0998-12-0 is before the earliest acceptable date of 1582-10-15.]],
1198   [[date.mdy(1,1,1582)], [sysmis],
1199    [error: DEBUG EVALUATE: Date 1582-1-1 is before the earliest acceptable date of 1582-10-15.]],
1200   [[date.mdy(10,14,1582)], [sysmis],
1201    [error: DEBUG EVALUATE: Date 1582-10-14 is before the earliest acceptable date of 1582-10-15.]],
1202   [[date.mdy(10,15,1582)], [86400.00]],
1203
1204   [[ctime.days(date.moyr(1,2000))], [152385.00]],
1205   [[ctime.days(date.moyr(2,2000))], [152416.00]],
1206   [[ctime.days(date.moyr(3,2000))], [152445.00]],
1207   [[ctime.days(date.moyr(4,2000))], [152476.00]],
1208   [[ctime.days(date.moyr(5,2000))], [152506.00]],
1209   [[ctime.days(date.moyr(13,2000))], [152751.00]],
1210   [[ctime.days(date.moyr(14,2000))], [sysmis],
1211    [error: DEBUG EVALUATE: Month 14 is not in acceptable range of 0 to 13.]],
1212   [[ctime.days(date.moyr($sysmis,2000))], [sysmis]],
1213   [[ctime.days(date.moyr(1,$sysmis))], [sysmis]],
1214   [[ctime.days(date.moyr($sysmis,$sysmis))], [sysmis]],
1215   [[date.moyr('a',2000)], [error],
1216    [error: DEBUG EVALUATE: Type mismatch invoking DATE.MOYR(number, number) as date.moyr(string, number).]],
1217   [[date.moyr(5,'a')], [error],
1218    [error: DEBUG EVALUATE: Type mismatch invoking DATE.MOYR(number, number) as date.moyr(number, string).]],
1219   [[date.moyr('a','b')], [error],
1220    [error: DEBUG EVALUATE: Type mismatch invoking DATE.MOYR(number, number) as date.moyr(string, string).]],
1221
1222   [[ctime.days(date.qyr(1,2000))], [152385.00]],
1223   [[ctime.days(date.qyr(2,2000))], [152476.00]],
1224   [[ctime.days(date.qyr(5,2000))], [sysmis],
1225    [warning: DEBUG EVALUATE: The first argument to DATE.QYR must be 1, 2, 3, or 4.]],
1226   [[ctime.days(date.qyr(6,2000))], [sysmis],
1227    [warning: DEBUG EVALUATE: The first argument to DATE.QYR must be 1, 2, 3, or 4.]],
1228   [[ctime.days(date.qyr($sysmis,2000))], [sysmis]],
1229   [[ctime.days(date.qyr(1,$sysmis))], [sysmis]],
1230   [[ctime.days(date.qyr($sysmis,$sysmis))], [sysmis]],
1231   [[date.qyr('a',2000)], [error],
1232    [error: DEBUG EVALUATE: Type mismatch invoking DATE.QYR(number, number) as date.qyr(string, number).]],
1233   [[date.qyr(5,'a')], [error],
1234    [error: DEBUG EVALUATE: Type mismatch invoking DATE.QYR(number, number) as date.qyr(number, string).]],
1235   [[date.qyr('a','b')], [error],
1236    [error: DEBUG EVALUATE: Type mismatch invoking DATE.QYR(number, number) as date.qyr(string, string).]],
1237
1238   [[ctime.days(date.wkyr(1,2000))], [152385.00]],
1239   [[ctime.days(date.wkyr(15,1999))], [152118.00]],
1240   [[ctime.days(date.wkyr(36,1999))], [152265.00]],
1241   [[ctime.days(date.wkyr(54,1999))], [sysmis],
1242    [error: DEBUG EVALUATE: The week argument to DATE.WKYR is outside the acceptable range of 1 to 53.  The result will be system-missing.]],
1243   [[ctime.days(date.wkyr($sysmis,1999))], [sysmis]],
1244   [[ctime.days(date.wkyr(1,$sysmis))], [sysmis]],
1245   [[ctime.days(date.wkyr($sysmis,$sysmis))], [sysmis]],
1246   [[date.wkyr('a',1999)], [error],
1247    [error: DEBUG EVALUATE: Type mismatch invoking DATE.WKYR(number, number) as date.wkyr(string, number).]],
1248   [[date.wkyr(5,'a')], [error],
1249    [error: DEBUG EVALUATE: Type mismatch invoking DATE.WKYR(number, number) as date.wkyr(number, string).]],
1250   [[date.wkyr('a','b')], [error],
1251    [error: DEBUG EVALUATE: Type mismatch invoking DATE.WKYR(number, number) as date.wkyr(string, string).]],
1252
1253   [[ctime.days(date.yrday(2000,1))], [152385.00]],
1254   [[ctime.days(date.yrday(2000,100))], [152484.00]],
1255   [[ctime.days(date.yrday(2000,253))], [152637.00]],
1256   [[ctime.days(date.yrday(2000,500))], [sysmis],
1257    [error: DEBUG EVALUATE: The day argument to DATE.YRDAY is outside the acceptable range of 1 to 366.  The result will be system-missing.]],
1258   [[ctime.days(date.yrday(2000,-100))], [sysmis],
1259    [error: DEBUG EVALUATE: The day argument to DATE.YRDAY is outside the acceptable range of 1 to 366.  The result will be system-missing.]],
1260   [[ctime.days(date.yrday(1999,$sysmis))], [sysmis]],
1261   [[ctime.days(date.yrday($sysmis,1))], [sysmis]],
1262   [[ctime.days(date.yrday($sysmis,$sysmis))], [sysmis]],
1263   [[date.yrday(1999,'a')], [error],
1264    [error: DEBUG EVALUATE: Type mismatch invoking DATE.YRDAY(number, number) as date.yrday(number, string).]],
1265   [[date.yrday('a',5)], [error],
1266    [error: DEBUG EVALUATE: Type mismatch invoking DATE.YRDAY(number, number) as date.yrday(string, number).]],
1267   [[date.yrday('a','b')], [error],
1268    [error: DEBUG EVALUATE: Type mismatch invoking DATE.YRDAY(number, number) as date.yrday(string, string).]])
1269
1270 CHECK_EXPR_EVAL([xdate],
1271   [[xdate.date(date.mdy(6,10,1648) + time.hms(0,0,0)) / 86400], [23981.00]],
1272   [[xdate.date(date.mdy(6,30,1680) + time.hms(4,50,38)) / 86400], [35689.00]],
1273   [[xdate.date(date.mdy(7,24,1716) + time.hms(12,31,35)) / 86400], [48861.00]],
1274   [[xdate.date(date.mdy(6,19,1768) + time.hms(12,47,53)) / 86400], [67819.00]],
1275   [[xdate.date(date.mdy(8,2,1819) + time.hms(1,26,0)) / 86400], [86489.00]],
1276   [[xdate.date(date.mdy(3,27,1839) + time.hms(20,58,11)) / 86400], [93666.00]],
1277   [[xdate.date(date.mdy(4,19,1903) + time.hms(7,36,5)) / 86400], [117064.00]],
1278   [[xdate.date(date.mdy(8,25,1929) + time.hms(15,43,49)) / 86400], [126689.00]],
1279   [[xdate.date(date.mdy(9,29,1941) + time.hms(4,25,9)) / 86400], [131107.00]],
1280   [[xdate.date(date.mdy(4,19,1943) + time.hms(6,49,27)) / 86400], [131674.00]],
1281   [[xdate.date(date.mdy(10,7,1943) + time.hms(2,57,52)) / 86400], [131845.00]],
1282   [[xdate.date(date.mdy(3,17,1992) + time.hms(16,45,44)) / 86400], [149539.00]],
1283   [[xdate.date(date.mdy(2,25,1996) + time.hms(21,30,57)) / 86400], [150979.00]],
1284   [[xdate.date(date.mdy(9,29,1941) + time.hms(4,25,9)) / 86400], [131107.00]],
1285   [[xdate.date(date.mdy(4,19,43) + time.hms(6,49,27)) / 86400], [131674.00]],
1286   [[xdate.date(date.mdy(10,7,43) + time.hms(2,57,52)) / 86400], [131845.00]],
1287   [[xdate.date(date.mdy(3,17,92) + time.hms(16,45,44)) / 86400], [149539.00]],
1288   [[xdate.date(date.mdy(2,25,96) + time.hms(21,30,57)) / 86400], [150979.00]],
1289   [[xdate.date(date.mdy(11,10,2038) + time.hms(22,30,4)) / 86400], [166578.00]],
1290   [[xdate.date(date.mdy(7,18,2094) + time.hms(1,56,51)) / 86400], [186917.00]],
1291   [[xdate.date(123.4)], [0.00]],
1292   [[xdate.date('')], [error],
1293    [error: DEBUG EVALUATE: Type mismatch invoking XDATE.DATE(number) as xdate.date(string).]],
1294
1295   [[xdate.hour(date.mdy(6,10,1648) + time.hms(0,0,0))], [0.00]],
1296   [[xdate.hour(date.mdy(6,30,1680) + time.hms(4,50,38))], [4.00]],
1297   [[xdate.hour(date.mdy(7,24,1716) + time.hms(12,31,35))], [12.00]],
1298   [[xdate.hour(date.mdy(6,19,1768) + time.hms(12,47,53))], [12.00]],
1299   [[xdate.hour(date.mdy(8,2,1819) + time.hms(1,26,0))], [1.00]],
1300   [[xdate.hour(date.mdy(3,27,1839) + time.hms(20,58,11))], [20.00]],
1301   [[xdate.hour(date.mdy(4,19,1903) + time.hms(7,36,5))], [7.00]],
1302   [[xdate.hour(date.mdy(8,25,1929) + time.hms(15,43,49))], [15.00]],
1303   [[xdate.hour(date.mdy(9,29,1941) + time.hms(4,25,9))], [4.00]],
1304   [[xdate.hour(date.mdy(4,19,1943) + time.hms(6,49,27))], [6.00]],
1305   [[xdate.hour(date.mdy(10,7,1943) + time.hms(2,57,52))], [2.00]],
1306   [[xdate.hour(date.mdy(3,17,1992) + time.hms(16,45,44))], [16.00]],
1307   [[xdate.hour(date.mdy(2,25,1996) + time.hms(21,30,57))], [21.00]],
1308   [[xdate.hour(date.mdy(9,29,1941) + time.hms(4,25,9))], [4.00]],
1309   [[xdate.hour(date.mdy(4,19,43) + time.hms(6,49,27))], [6.00]],
1310   [[xdate.hour(date.mdy(10,7,43) + time.hms(2,57,52))], [2.00]],
1311   [[xdate.hour(date.mdy(3,17,92) + time.hms(16,45,44))], [16.00]],
1312   [[xdate.hour(date.mdy(2,25,96) + time.hms(21,30,57))], [21.00]],
1313   [[xdate.hour(date.mdy(11,10,2038) + time.hms(22,30,4))], [22.00]],
1314   [[xdate.hour(date.mdy(7,18,2094) + time.hms(1,56,51))], [1.00]],
1315   [[xdate.hour(-1)], [-1.00]],
1316   [[xdate.hour(1)], [0.00]],
1317   [[xdate.hour($sysmis)], [sysmis]],
1318   [[xdate.hour('')], [error],
1319    [error: DEBUG EVALUATE: Type mismatch invoking XDATE.HOUR(number) as xdate.hour(string).]],
1320
1321   [[xdate.jday(date.mdy(6,10,1648) + time.hms(0,0,0))], [162.00]],
1322   [[xdate.jday(date.mdy(6,30,1680) + time.hms(4,50,38))], [182.00]],
1323   [[xdate.jday(date.mdy(7,24,1716) + time.hms(12,31,35))], [206.00]],
1324   [[xdate.jday(date.mdy(6,19,1768) + time.hms(12,47,53))], [171.00]],
1325   [[xdate.jday(date.mdy(8,2,1819) + time.hms(1,26,0))], [214.00]],
1326   [[xdate.jday(date.mdy(3,27,1839) + time.hms(20,58,11))], [86.00]],
1327   [[xdate.jday(date.mdy(4,19,1903) + time.hms(7,36,5))], [109.00]],
1328   [[xdate.jday(date.mdy(8,25,1929) + time.hms(15,43,49))], [237.00]],
1329   [[xdate.jday(date.mdy(9,29,1941) + time.hms(4,25,9))], [272.00]],
1330   [[xdate.jday(date.mdy(4,19,1943) + time.hms(6,49,27))], [109.00]],
1331   [[xdate.jday(date.mdy(10,7,1943) + time.hms(2,57,52))], [280.00]],
1332   [[xdate.jday(date.mdy(3,17,1992) + time.hms(16,45,44))], [77.00]],
1333   [[xdate.jday(date.mdy(2,25,1996) + time.hms(21,30,57))], [56.00]],
1334   [[xdate.jday(date.mdy(9,29,1941) + time.hms(4,25,9))], [272.00]],
1335   [[xdate.jday(date.mdy(4,19,43) + time.hms(6,49,27))], [109.00]],
1336   [[xdate.jday(date.mdy(10,7,43) + time.hms(2,57,52))], [280.00]],
1337   [[xdate.jday(date.mdy(3,17,92) + time.hms(16,45,44))], [77.00]],
1338   [[xdate.jday(date.mdy(2,25,96) + time.hms(21,30,57))], [56.00]],
1339   [[xdate.jday(date.mdy(11,10,2038) + time.hms(22,30,4))], [314.00]],
1340   [[xdate.jday(date.mdy(7,18,2094) + time.hms(1,56,51))], [199.00]],
1341   [[xdate.jday(0)], [sysmis]],
1342   [[xdate.jday(1)], [sysmis]],
1343   [[xdate.jday(86400)], [288.00]],
1344
1345   [[xdate.mday(date.mdy(6,10,1648) + time.hms(0,0,0))], [10.00]],
1346   [[xdate.mday(date.mdy(6,30,1680) + time.hms(4,50,38))], [30.00]],
1347   [[xdate.mday(date.mdy(7,24,1716) + time.hms(12,31,35))], [24.00]],
1348   [[xdate.mday(date.mdy(6,19,1768) + time.hms(12,47,53))], [19.00]],
1349   [[xdate.mday(date.mdy(8,2,1819) + time.hms(1,26,0))], [2.00]],
1350   [[xdate.mday(date.mdy(3,27,1839) + time.hms(20,58,11))], [27.00]],
1351   [[xdate.mday(date.mdy(4,19,1903) + time.hms(7,36,5))], [19.00]],
1352   [[xdate.mday(date.mdy(8,25,1929) + time.hms(15,43,49))], [25.00]],
1353   [[xdate.mday(date.mdy(9,29,1941) + time.hms(4,25,9))], [29.00]],
1354   [[xdate.mday(date.mdy(4,19,1943) + time.hms(6,49,27))], [19.00]],
1355   [[xdate.mday(date.mdy(10,7,1943) + time.hms(2,57,52))], [7.00]],
1356   [[xdate.mday(date.mdy(3,17,1992) + time.hms(16,45,44))], [17.00]],
1357   [[xdate.mday(date.mdy(2,25,1996) + time.hms(21,30,57))], [25.00]],
1358   [[xdate.mday(date.mdy(9,29,1941) + time.hms(4,25,9))], [29.00]],
1359   [[xdate.mday(date.mdy(4,19,43) + time.hms(6,49,27))], [19.00]],
1360   [[xdate.mday(date.mdy(10,7,43) + time.hms(2,57,52))], [7.00]],
1361   [[xdate.mday(date.mdy(3,17,92) + time.hms(16,45,44))], [17.00]],
1362   [[xdate.mday(date.mdy(2,25,96) + time.hms(21,30,57))], [25.00]],
1363   [[xdate.mday(date.mdy(11,10,2038) + time.hms(22,30,4))], [10.00]],
1364   [[xdate.mday(date.mdy(7,18,2094) + time.hms(1,56,51))], [18.00]],
1365
1366   [[xdate.minute(date.mdy(6,10,1648) + time.hms(0,0,0))], [0.00]],
1367   [[xdate.minute(date.mdy(6,30,1680) + time.hms(4,50,38))], [50.00]],
1368   [[xdate.minute(date.mdy(7,24,1716) + time.hms(12,31,35))], [31.00]],
1369   [[xdate.minute(date.mdy(6,19,1768) + time.hms(12,47,53))], [47.00]],
1370   [[xdate.minute(date.mdy(8,2,1819) + time.hms(1,26,0))], [26.00]],
1371   [[xdate.minute(date.mdy(3,27,1839) + time.hms(20,58,11))], [58.00]],
1372   [[xdate.minute(date.mdy(4,19,1903) + time.hms(7,36,5))], [36.00]],
1373   [[xdate.minute(date.mdy(8,25,1929) + time.hms(15,43,49))], [43.00]],
1374   [[xdate.minute(date.mdy(9,29,1941) + time.hms(4,25,9))], [25.00]],
1375   [[xdate.minute(date.mdy(4,19,1943) + time.hms(6,49,27))], [49.00]],
1376   [[xdate.minute(date.mdy(10,7,1943) + time.hms(2,57,52))], [57.00]],
1377   [[xdate.minute(date.mdy(3,17,1992) + time.hms(16,45,44))], [45.00]],
1378   [[xdate.minute(date.mdy(2,25,1996) + time.hms(21,30,57))], [30.00]],
1379   [[xdate.minute(date.mdy(9,29,1941) + time.hms(4,25,9))], [25.00]],
1380   [[xdate.minute(date.mdy(4,19,43) + time.hms(6,49,27))], [49.00]],
1381   [[xdate.minute(date.mdy(10,7,43) + time.hms(2,57,52))], [57.00]],
1382   [[xdate.minute(date.mdy(3,17,92) + time.hms(16,45,44))], [45.00]],
1383   [[xdate.minute(date.mdy(2,25,96) + time.hms(21,30,57))], [30.00]],
1384   [[xdate.minute(date.mdy(11,10,2038) + time.hms(22,30,4))], [30.00]],
1385   [[xdate.minute(date.mdy(7,18,2094) + time.hms(1,56,51))], [56.00]],
1386
1387   [[xdate.month(date.mdy(6,10,1648) + time.hms(0,0,0))], [6.00]],
1388   [[xdate.month(date.mdy(6,30,1680) + time.hms(4,50,38))], [6.00]],
1389   [[xdate.month(date.mdy(7,24,1716) + time.hms(12,31,35))], [7.00]],
1390   [[xdate.month(date.mdy(6,19,1768) + time.hms(12,47,53))], [6.00]],
1391   [[xdate.month(date.mdy(8,2,1819) + time.hms(1,26,0))], [8.00]],
1392   [[xdate.month(date.mdy(3,27,1839) + time.hms(20,58,11))], [3.00]],
1393   [[xdate.month(date.mdy(4,19,1903) + time.hms(7,36,5))], [4.00]],
1394   [[xdate.month(date.mdy(8,25,1929) + time.hms(15,43,49))], [8.00]],
1395   [[xdate.month(date.mdy(9,29,1941) + time.hms(4,25,9))], [9.00]],
1396   [[xdate.month(date.mdy(4,19,1943) + time.hms(6,49,27))], [4.00]],
1397   [[xdate.month(date.mdy(10,7,1943) + time.hms(2,57,52))], [10.00]],
1398   [[xdate.month(date.mdy(3,17,1992) + time.hms(16,45,44))], [3.00]],
1399   [[xdate.month(date.mdy(2,25,1996) + time.hms(21,30,57))], [2.00]],
1400   [[xdate.month(date.mdy(9,29,1941) + time.hms(4,25,9))], [9.00]],
1401   [[xdate.month(date.mdy(4,19,43) + time.hms(6,49,27))], [4.00]],
1402   [[xdate.month(date.mdy(10,7,43) + time.hms(2,57,52))], [10.00]],
1403   [[xdate.month(date.mdy(3,17,92) + time.hms(16,45,44))], [3.00]],
1404   [[xdate.month(date.mdy(2,25,96) + time.hms(21,30,57))], [2.00]],
1405   [[xdate.month(date.mdy(11,10,2038) + time.hms(22,30,4))], [11.00]],
1406   [[xdate.month(date.mdy(7,18,2094) + time.hms(1,56,51))], [7.00]],
1407
1408   [[xdate.quarter(date.mdy(6,10,1648) + time.hms(0,0,0))], [2.00]],
1409   [[xdate.quarter(date.mdy(6,30,1680) + time.hms(4,50,38))], [2.00]],
1410   [[xdate.quarter(date.mdy(7,24,1716) + time.hms(12,31,35))], [3.00]],
1411   [[xdate.quarter(date.mdy(6,19,1768) + time.hms(12,47,53))], [2.00]],
1412   [[xdate.quarter(date.mdy(8,2,1819) + time.hms(1,26,0))], [3.00]],
1413   [[xdate.quarter(date.mdy(3,27,1839) + time.hms(20,58,11))], [1.00]],
1414   [[xdate.quarter(date.mdy(4,19,1903) + time.hms(7,36,5))], [2.00]],
1415   [[xdate.quarter(date.mdy(8,25,1929) + time.hms(15,43,49))], [3.00]],
1416   [[xdate.quarter(date.mdy(9,29,1941) + time.hms(4,25,9))], [3.00]],
1417   [[xdate.quarter(date.mdy(4,19,1943) + time.hms(6,49,27))], [2.00]],
1418   [[xdate.quarter(date.mdy(10,7,1943) + time.hms(2,57,52))], [4.00]],
1419   [[xdate.quarter(date.mdy(3,17,1992) + time.hms(16,45,44))], [1.00]],
1420   [[xdate.quarter(date.mdy(2,25,1996) + time.hms(21,30,57))], [1.00]],
1421   [[xdate.quarter(date.mdy(9,29,1941) + time.hms(4,25,9))], [3.00]],
1422   [[xdate.quarter(date.mdy(4,19,43) + time.hms(6,49,27))], [2.00]],
1423   [[xdate.quarter(date.mdy(10,7,43) + time.hms(2,57,52))], [4.00]],
1424   [[xdate.quarter(date.mdy(3,17,92) + time.hms(16,45,44))], [1.00]],
1425   [[xdate.quarter(date.mdy(2,25,96) + time.hms(21,30,57))], [1.00]],
1426   [[xdate.quarter(date.mdy(11,10,2038) + time.hms(22,30,4))], [4.00]],
1427   [[xdate.quarter(date.mdy(7,18,2094) + time.hms(1,56,51))], [3.00]],
1428
1429   [[xdate.second(date.mdy(6,10,1648) + time.hms(0,0,0))], [0.00]],
1430   [[xdate.second(date.mdy(6,30,1680) + time.hms(4,50,38))], [38.00]],
1431   [[xdate.second(date.mdy(7,24,1716) + time.hms(12,31,35))], [35.00]],
1432   [[xdate.second(date.mdy(6,19,1768) + time.hms(12,47,53))], [53.00]],
1433   [[xdate.second(date.mdy(8,2,1819) + time.hms(1,26,0))], [0.00]],
1434   [[xdate.second(date.mdy(3,27,1839) + time.hms(20,58,11))], [11.00]],
1435   [[xdate.second(date.mdy(4,19,1903) + time.hms(7,36,5))], [5.00]],
1436   [[xdate.second(date.mdy(8,25,1929) + time.hms(15,43,49))], [49.00]],
1437   [[xdate.second(date.mdy(9,29,1941) + time.hms(4,25,9))], [9.00]],
1438   [[xdate.second(date.mdy(4,19,1943) + time.hms(6,49,27))], [27.00]],
1439   [[xdate.second(date.mdy(10,7,1943) + time.hms(2,57,52))], [52.00]],
1440   [[xdate.second(date.mdy(3,17,1992) + time.hms(16,45,44))], [44.00]],
1441   [[xdate.second(date.mdy(2,25,1996) + time.hms(21,30,57))], [57.00]],
1442   [[xdate.second(date.mdy(9,29,1941) + time.hms(4,25,9))], [9.00]],
1443   [[xdate.second(date.mdy(4,19,43) + time.hms(6,49,27))], [27.00]],
1444   [[xdate.second(date.mdy(10,7,43) + time.hms(2,57,52))], [52.00]],
1445   [[xdate.second(date.mdy(3,17,92) + time.hms(16,45,44))], [44.00]],
1446   [[xdate.second(date.mdy(2,25,96) + time.hms(21,30,57))], [57.00]],
1447   [[xdate.second(date.mdy(11,10,2038) + time.hms(22,30,4))], [4.00]],
1448   [[xdate.second(date.mdy(7,18,2094) + time.hms(1,56,51))], [51.00]],
1449
1450   [[xdate.tday(date.mdy(6,10,1648) + time.hms(0,0,0))], [23981.00]],
1451   [[xdate.tday(date.mdy(6,30,1680) + time.hms(4,50,38))], [35689.00]],
1452   [[xdate.tday(date.mdy(7,24,1716) + time.hms(12,31,35))], [48861.00]],
1453   [[xdate.tday(date.mdy(6,19,1768) + time.hms(12,47,53))], [67819.00]],
1454   [[xdate.tday(date.mdy(8,2,1819) + time.hms(1,26,0))], [86489.00]],
1455   [[xdate.tday(date.mdy(3,27,1839) + time.hms(20,58,11))], [93666.00]],
1456   [[xdate.tday(date.mdy(4,19,1903) + time.hms(7,36,5))], [117064.00]],
1457   [[xdate.tday(date.mdy(8,25,1929) + time.hms(15,43,49))], [126689.00]],
1458   [[xdate.tday(date.mdy(9,29,1941) + time.hms(4,25,9))], [131107.00]],
1459   [[xdate.tday(date.mdy(4,19,1943) + time.hms(6,49,27))], [131674.00]],
1460   [[xdate.tday(date.mdy(10,7,1943) + time.hms(2,57,52))], [131845.00]],
1461   [[xdate.tday(date.mdy(3,17,1992) + time.hms(16,45,44))], [149539.00]],
1462   [[xdate.tday(date.mdy(2,25,1996) + time.hms(21,30,57))], [150979.00]],
1463   [[xdate.tday(date.mdy(9,29,1941) + time.hms(4,25,9))], [131107.00]],
1464   [[xdate.tday(date.mdy(4,19,43) + time.hms(6,49,27))], [131674.00]],
1465   [[xdate.tday(date.mdy(10,7,43) + time.hms(2,57,52))], [131845.00]],
1466   [[xdate.tday(date.mdy(3,17,92) + time.hms(16,45,44))], [149539.00]],
1467   [[xdate.tday(date.mdy(2,25,96) + time.hms(21,30,57))], [150979.00]],
1468   [[xdate.tday(date.mdy(11,10,2038) + time.hms(22,30,4))], [166578.00]],
1469   [[xdate.tday(date.mdy(7,18,2094) + time.hms(1,56,51))], [186917.00]],
1470
1471   [[xdate.time(date.mdy(6,10,1648) + time.hms(0,0,0))], [0.00]],
1472   [[xdate.time(date.mdy(6,30,1680) + time.hms(4,50,38))], [17438.00]],
1473   [[xdate.time(date.mdy(7,24,1716) + time.hms(12,31,35))], [45095.00]],
1474   [[xdate.time(date.mdy(6,19,1768) + time.hms(12,47,53))], [46073.00]],
1475   [[xdate.time(date.mdy(8,2,1819) + time.hms(1,26,0))], [5160.00]],
1476   [[xdate.time(date.mdy(3,27,1839) + time.hms(20,58,11))], [75491.00]],
1477   [[xdate.time(date.mdy(4,19,1903) + time.hms(7,36,5))], [27365.00]],
1478   [[xdate.time(date.mdy(8,25,1929) + time.hms(15,43,49))], [56629.00]],
1479   [[xdate.time(date.mdy(9,29,1941) + time.hms(4,25,9))], [15909.00]],
1480   [[xdate.time(date.mdy(4,19,1943) + time.hms(6,49,27))], [24567.00]],
1481   [[xdate.time(date.mdy(10,7,1943) + time.hms(2,57,52))], [10672.00]],
1482   [[xdate.time(date.mdy(3,17,1992) + time.hms(16,45,44))], [60344.00]],
1483   [[xdate.time(date.mdy(2,25,1996) + time.hms(21,30,57))], [77457.00]],
1484   [[xdate.time(date.mdy(9,29,1941) + time.hms(4,25,9))], [15909.00]],
1485   [[xdate.time(date.mdy(4,19,43) + time.hms(6,49,27))], [24567.00]],
1486   [[xdate.time(date.mdy(10,7,43) + time.hms(2,57,52))], [10672.00]],
1487   [[xdate.time(date.mdy(3,17,92) + time.hms(16,45,44))], [60344.00]],
1488   [[xdate.time(date.mdy(2,25,96) + time.hms(21,30,57))], [77457.00]],
1489   [[xdate.time(date.mdy(11,10,2038) + time.hms(22,30,4))], [81004.00]],
1490   [[xdate.time(date.mdy(7,18,2094) + time.hms(1,56,51))], [7011.00]],
1491
1492   [[xdate.week(date.mdy(6,10,1648) + time.hms(0,0,0))], [24.00]],
1493   [[xdate.week(date.mdy(6,30,1680) + time.hms(4,50,38))], [26.00]],
1494   [[xdate.week(date.mdy(7,24,1716) + time.hms(12,31,35))], [30.00]],
1495   [[xdate.week(date.mdy(6,19,1768) + time.hms(12,47,53))], [25.00]],
1496   [[xdate.week(date.mdy(8,2,1819) + time.hms(1,26,0))], [31.00]],
1497   [[xdate.week(date.mdy(3,27,1839) + time.hms(20,58,11))], [13.00]],
1498   [[xdate.week(date.mdy(4,19,1903) + time.hms(7,36,5))], [16.00]],
1499   [[xdate.week(date.mdy(8,25,1929) + time.hms(15,43,49))], [34.00]],
1500   [[xdate.week(date.mdy(9,29,1941) + time.hms(4,25,9))], [39.00]],
1501   [[xdate.week(date.mdy(4,19,1943) + time.hms(6,49,27))], [16.00]],
1502   [[xdate.week(date.mdy(10,7,1943) + time.hms(2,57,52))], [40.00]],
1503   [[xdate.week(date.mdy(3,17,1992) + time.hms(16,45,44))], [11.00]],
1504   [[xdate.week(date.mdy(2,25,1996) + time.hms(21,30,57))], [8.00]],
1505   [[xdate.week(date.mdy(9,29,1941) + time.hms(4,25,9))], [39.00]],
1506   [[xdate.week(date.mdy(4,19,43) + time.hms(6,49,27))], [16.00]],
1507   [[xdate.week(date.mdy(10,7,43) + time.hms(2,57,52))], [40.00]],
1508   [[xdate.week(date.mdy(3,17,92) + time.hms(16,45,44))], [11.00]],
1509   [[xdate.week(date.mdy(2,25,96) + time.hms(21,30,57))], [8.00]],
1510   [[xdate.week(date.mdy(11,10,2038) + time.hms(22,30,4))], [45.00]],
1511   [[xdate.week(date.mdy(7,18,2094) + time.hms(1,56,51))], [29.00]],
1512
1513   [[xdate.wkday(date.mdy(6,10,1648))], [4.00]],
1514   [[xdate.wkday(date.mdy(6,30,1680))], [1.00]],
1515   [[xdate.wkday(date.mdy(7,24,1716))], [6.00]],
1516   [[xdate.wkday(date.mdy(6,19,1768))], [1.00]],
1517   [[xdate.wkday(date.mdy(8,2,1819))], [2.00]],
1518   [[xdate.wkday(date.mdy(3,27,1839))], [4.00]],
1519   [[xdate.wkday(date.mdy(4,19,1903))], [1.00]],
1520   [[xdate.wkday(date.mdy(8,25,1929))], [1.00]],
1521   [[xdate.wkday(date.mdy(9,29,1941))], [2.00]],
1522   [[xdate.wkday(date.mdy(4,19,1943))], [2.00]],
1523   [[xdate.wkday(date.mdy(10,7,1943))], [5.00]],
1524   [[xdate.wkday(date.mdy(3,17,1992))], [3.00]],
1525   [[xdate.wkday(date.mdy(2,25,1996))], [1.00]],
1526   [[xdate.wkday(date.mdy(9,29,1941))], [2.00]],
1527   [[xdate.wkday(date.mdy(4,19,43))], [2.00]],
1528   [[xdate.wkday(date.mdy(10,7,43))], [5.00]],
1529   [[xdate.wkday(date.mdy(3,17,92))], [3.00]],
1530   [[xdate.wkday(date.mdy(2,25,96))], [1.00]],
1531   [[xdate.wkday(date.mdy(11,10,2038))], [4.00]],
1532   [[xdate.wkday(date.mdy(7,18,2094))], [1.00]],
1533
1534   [[xdate.year(date.mdy(6,10,1648) + time.hms(0,0,0))], [1648.00]],
1535   [[xdate.year(date.mdy(6,30,1680) + time.hms(4,50,38))], [1680.00]],
1536   [[xdate.year(date.mdy(7,24,1716) + time.hms(12,31,35))], [1716.00]],
1537   [[xdate.year(date.mdy(6,19,1768) + time.hms(12,47,53))], [1768.00]],
1538   [[xdate.year(date.mdy(8,2,1819) + time.hms(1,26,0))], [1819.00]],
1539   [[xdate.year(date.mdy(3,27,1839) + time.hms(20,58,11))], [1839.00]],
1540   [[xdate.year(date.mdy(4,19,1903) + time.hms(7,36,5))], [1903.00]],
1541   [[xdate.year(date.mdy(8,25,1929) + time.hms(15,43,49))], [1929.00]],
1542   [[xdate.year(date.mdy(9,29,1941) + time.hms(4,25,9))], [1941.00]],
1543   [[xdate.year(date.mdy(4,19,1943) + time.hms(6,49,27))], [1943.00]],
1544   [[xdate.year(date.mdy(10,7,1943) + time.hms(2,57,52))], [1943.00]],
1545   [[xdate.year(date.mdy(3,17,1992) + time.hms(16,45,44))], [1992.00]],
1546   [[xdate.year(date.mdy(2,25,1996) + time.hms(21,30,57))], [1996.00]],
1547   [[xdate.year(date.mdy(9,29,1941) + time.hms(4,25,9))], [1941.00]],
1548   [[xdate.year(date.mdy(4,19,43) + time.hms(6,49,27))], [1943.00]],
1549   [[xdate.year(date.mdy(10,7,43) + time.hms(2,57,52))], [1943.00]],
1550   [[xdate.year(date.mdy(3,17,92) + time.hms(16,45,44))], [1992.00]],
1551   [[xdate.year(date.mdy(2,25,96) + time.hms(21,30,57))], [1996.00]],
1552   [[xdate.year(date.mdy(11,10,2038) + time.hms(22,30,4))], [2038.00]],
1553   [[xdate.year(date.mdy(7,18,2094) + time.hms(1,56,51))], [2094.00]])
1554
1555 CHECK_EXPR_EVAL([datediff],
1556   [[datediff(date.mdy(6,10,1648), date.mdy(6,30,1680), 'years')], [-32.00]],
1557   [[datediff(date.mdy(6,30,1680), date.mdy(7,24,1716), 'years')], [-36.00]],
1558   [[datediff(date.mdy(7,24,1716), date.mdy(6,19,1768), 'years')], [-51.00]],
1559   [[datediff(date.mdy(6,19,1768), date.mdy(8,2,1819), 'years')], [-51.00]],
1560   [[datediff(date.mdy(8,2,1819), date.mdy(3,27,1839), 'years')], [-19.00]],
1561   [[datediff(date.mdy(3,27,1839), date.mdy(4,19,1903), 'years')], [-64.00]],
1562   [[datediff(date.mdy(4,19,1903), date.mdy(8,25,1929), 'years')], [-26.00]],
1563   [[datediff(date.mdy(8,25,1929), date.mdy(9,29,1941), 'years')], [-12.00]],
1564   [[datediff(date.mdy(9,29,1941), date.mdy(4,19,1943), 'years')], [-1.00]],
1565   [[datediff(date.mdy(4,19,1943), date.mdy(10,7,1943), 'years')], [0.00]],
1566   [[datediff(date.mdy(10,7,1943), date.mdy(3,17,1992), 'years')], [-48.00]],
1567   [[datediff(date.mdy(3,17,1992), date.mdy(2,25,1996), 'years')], [-3.00]],
1568   [[datediff(date.mdy(9,29,1941), date.mdy(2,25,1996), 'years')], [-54.00]],
1569   [[datediff(date.mdy(9,29,1941), date.mdy(4,19,43), 'years')], [-1.00]],
1570   [[datediff(date.mdy(4,19,43), date.mdy(10,7,43), 'years')], [0.00]],
1571   [[datediff(date.mdy(10,7,43), date.mdy(3,17,92), 'years')], [-48.00]],
1572   [[datediff(date.mdy(3,17,92), date.mdy(2,25,96), 'years')], [-3.00]],
1573   [[datediff(date.mdy(2,25,96), date.mdy(11,10,2038), 'years')], [-42.00]],
1574   [[datediff(date.mdy(11,10,2038), date.mdy(7,18,2094), 'years')], [-55.00]],
1575   [[datediff(date.mdy(2,29,1900), date.mdy(2,29,1904), 'years')], [-3.00]],
1576   [[datediff(date.mdy(2,29,1904), date.mdy(2,29,1908), 'years')], [-4.00]],
1577   [[datediff(date.mdy(2,29,1900), date.mdy(2,28,1903), 'years')], [-2.00]],
1578
1579   [[datediff(date.mdy(6,10,1648), date.mdy(6,30,1680), 'quarters')], [-128.00]],
1580   [[datediff(date.mdy(6,30,1680), date.mdy(7,24,1716), 'quarters')], [-144.00]],
1581   [[datediff(date.mdy(7,24,1716), date.mdy(6,19,1768), 'quarters')], [-207.00]],
1582   [[datediff(date.mdy(6,19,1768), date.mdy(8,2,1819), 'quarters')], [-204.00]],
1583   [[datediff(date.mdy(8,2,1819), date.mdy(3,27,1839), 'quarters')], [-78.00]],
1584   [[datediff(date.mdy(3,27,1839), date.mdy(4,19,1903), 'quarters')], [-256.00]],
1585   [[datediff(date.mdy(4,19,1903), date.mdy(8,25,1929), 'quarters')], [-105.00]],
1586   [[datediff(date.mdy(8,25,1929), date.mdy(9,29,1941), 'quarters')], [-48.00]],
1587   [[datediff(date.mdy(9,29,1941), date.mdy(4,19,1943), 'quarters')], [-6.00]],
1588   [[datediff(date.mdy(4,19,1943), date.mdy(10,7,1943), 'quarters')], [-1.00]],
1589   [[datediff(date.mdy(10,7,1943), date.mdy(3,17,1992), 'quarters')], [-193.00]],
1590   [[datediff(date.mdy(3,17,1992), date.mdy(2,25,1996), 'quarters')], [-15.00]],
1591   [[datediff(date.mdy(9,29,1941), date.mdy(2,25,1996), 'quarters')], [-217.00]],
1592   [[datediff(date.mdy(9,29,1941), date.mdy(4,19,43), 'quarters')], [-6.00]],
1593   [[datediff(date.mdy(4,19,43), date.mdy(10,7,43), 'quarters')], [-1.00]],
1594   [[datediff(date.mdy(10,7,43), date.mdy(3,17,92), 'quarters')], [-193.00]],
1595   [[datediff(date.mdy(3,17,92), date.mdy(2,25,96), 'quarters')], [-15.00]],
1596   [[datediff(date.mdy(2,25,96), date.mdy(11,10,2038), 'quarters')], [-170.00]],
1597   [[datediff(date.mdy(11,10,2038), date.mdy(7,18,2094), 'quarters')], [-222.00]],
1598   [[datediff(date.mdy(2,29,1900), date.mdy(2,29,1904), 'quarters')], [-15.00]],
1599   [[datediff(date.mdy(2,29,1904), date.mdy(2,29,1908), 'quarters')], [-16.00]],
1600   [[datediff(date.mdy(2,29,1900), date.mdy(2,28,1903), 'quarters')], [-11.00]],
1601
1602   [[datediff(date.mdy(6,10,1648), date.mdy(6,30,1680), 'months')], [-384.00]],
1603   [[datediff(date.mdy(6,30,1680), date.mdy(7,24,1716), 'months')], [-432.00]],
1604   [[datediff(date.mdy(7,24,1716), date.mdy(6,19,1768), 'months')], [-622.00]],
1605   [[datediff(date.mdy(6,19,1768), date.mdy(8,2,1819), 'months')], [-613.00]],
1606   [[datediff(date.mdy(8,2,1819), date.mdy(3,27,1839), 'months')], [-235.00]],
1607   [[datediff(date.mdy(3,27,1839), date.mdy(4,19,1903), 'months')], [-768.00]],
1608   [[datediff(date.mdy(4,19,1903), date.mdy(8,25,1929), 'months')], [-316.00]],
1609   [[datediff(date.mdy(8,25,1929), date.mdy(9,29,1941), 'months')], [-145.00]],
1610   [[datediff(date.mdy(9,29,1941), date.mdy(4,19,1943), 'months')], [-18.00]],
1611   [[datediff(date.mdy(4,19,1943), date.mdy(10,7,1943), 'months')], [-5.00]],
1612   [[datediff(date.mdy(10,7,1943), date.mdy(3,17,1992), 'months')], [-581.00]],
1613   [[datediff(date.mdy(3,17,1992), date.mdy(2,25,1996), 'months')], [-47.00]],
1614   [[datediff(date.mdy(9,29,1941), date.mdy(2,25,1996), 'months')], [-652.00]],
1615   [[datediff(date.mdy(9,29,1941), date.mdy(4,19,43), 'months')], [-18.00]],
1616   [[datediff(date.mdy(4,19,43), date.mdy(10,7,43), 'months')], [-5.00]],
1617   [[datediff(date.mdy(10,7,43), date.mdy(3,17,92), 'months')], [-581.00]],
1618   [[datediff(date.mdy(3,17,92), date.mdy(2,25,96), 'months')], [-47.00]],
1619   [[datediff(date.mdy(2,25,96), date.mdy(11,10,2038), 'months')], [-512.00]],
1620   [[datediff(date.mdy(11,10,2038), date.mdy(7,18,2094), 'months')], [-668.00]],
1621   [[datediff(date.mdy(2,29,1900), date.mdy(2,29,1904), 'months')], [-47.00]],
1622   [[datediff(date.mdy(2,29,1904), date.mdy(2,29,1908), 'months')], [-48.00]],
1623   [[datediff(date.mdy(2,29,1900), date.mdy(2,28,1903), 'months')], [-35.00]],
1624
1625   [[datediff(date.mdy(6,10,1648), date.mdy(6,30,1680), 'weeks')], [-1672.00]],
1626   [[datediff(date.mdy(6,30,1680), date.mdy(7,24,1716), 'weeks')], [-1881.00]],
1627   [[datediff(date.mdy(7,24,1716), date.mdy(6,19,1768), 'weeks')], [-2708.00]],
1628   [[datediff(date.mdy(6,19,1768), date.mdy(8,2,1819), 'weeks')], [-2667.00]],
1629   [[datediff(date.mdy(8,2,1819), date.mdy(3,27,1839), 'weeks')], [-1025.00]],
1630   [[datediff(date.mdy(3,27,1839), date.mdy(4,19,1903), 'weeks')], [-3342.00]],
1631   [[datediff(date.mdy(4,19,1903), date.mdy(8,25,1929), 'weeks')], [-1375.00]],
1632   [[datediff(date.mdy(8,25,1929), date.mdy(9,29,1941), 'weeks')], [-631.00]],
1633   [[datediff(date.mdy(9,29,1941), date.mdy(4,19,1943), 'weeks')], [-81.00]],
1634   [[datediff(date.mdy(4,19,1943), date.mdy(10,7,1943), 'weeks')], [-24.00]],
1635   [[datediff(date.mdy(10,7,1943), date.mdy(3,17,1992), 'weeks')], [-2527.00]],
1636   [[datediff(date.mdy(3,17,1992), date.mdy(2,25,1996), 'weeks')], [-205.00]],
1637   [[datediff(date.mdy(9,29,1941), date.mdy(2,25,1996), 'weeks')], [-2838.00]],
1638   [[datediff(date.mdy(9,29,1941), date.mdy(4,19,43), 'weeks')], [-81.00]],
1639   [[datediff(date.mdy(4,19,43), date.mdy(10,7,43), 'weeks')], [-24.00]],
1640   [[datediff(date.mdy(10,7,43), date.mdy(3,17,92), 'weeks')], [-2527.00]],
1641   [[datediff(date.mdy(3,17,92), date.mdy(2,25,96), 'weeks')], [-205.00]],
1642   [[datediff(date.mdy(2,25,96), date.mdy(11,10,2038), 'weeks')], [-2228.00]],
1643   [[datediff(date.mdy(11,10,2038), date.mdy(7,18,2094), 'weeks')], [-2905.00]],
1644   [[datediff(date.mdy(2,29,1900), date.mdy(2,29,1904), 'weeks')], [-208.00]],
1645   [[datediff(date.mdy(2,29,1904), date.mdy(2,29,1908), 'weeks')], [-208.00]],
1646   [[datediff(date.mdy(2,29,1900), date.mdy(2,28,1903), 'weeks')], [-156.00]],
1647
1648   [[datediff(date.mdy(6,10,1648), date.mdy(6,30,1680), 'days')], [-11708.00]],
1649   [[datediff(date.mdy(6,30,1680), date.mdy(7,24,1716), 'days')], [-13172.00]],
1650   [[datediff(date.mdy(7,24,1716), date.mdy(6,19,1768), 'days')], [-18958.00]],
1651   [[datediff(date.mdy(6,19,1768), date.mdy(8,2,1819), 'days')], [-18670.00]],
1652   [[datediff(date.mdy(8,2,1819), date.mdy(3,27,1839), 'days')], [-7177.00]],
1653   [[datediff(date.mdy(3,27,1839), date.mdy(4,19,1903), 'days')], [-23398.00]],
1654   [[datediff(date.mdy(4,19,1903), date.mdy(8,25,1929), 'days')], [-9625.00]],
1655   [[datediff(date.mdy(8,25,1929), date.mdy(9,29,1941), 'days')], [-4418.00]],
1656   [[datediff(date.mdy(9,29,1941), date.mdy(4,19,1943), 'days')], [-567.00]],
1657   [[datediff(date.mdy(4,19,1943), date.mdy(10,7,1943), 'days')], [-171.00]],
1658   [[datediff(date.mdy(10,7,1943), date.mdy(3,17,1992), 'days')], [-17694.00]],
1659   [[datediff(date.mdy(3,17,1992), date.mdy(2,25,1996), 'days')], [-1440.00]],
1660   [[datediff(date.mdy(9,29,1941), date.mdy(2,25,1996), 'days')], [-19872.00]],
1661   [[datediff(date.mdy(9,29,1941), date.mdy(4,19,43), 'days')], [-567.00]],
1662   [[datediff(date.mdy(4,19,43), date.mdy(10,7,43), 'days')], [-171.00]],
1663   [[datediff(date.mdy(10,7,43), date.mdy(3,17,92), 'days')], [-17694.00]],
1664   [[datediff(date.mdy(3,17,92), date.mdy(2,25,96), 'days')], [-1440.00]],
1665   [[datediff(date.mdy(2,25,96), date.mdy(11,10,2038), 'days')], [-15599.00]],
1666   [[datediff(date.mdy(11,10,2038), date.mdy(7,18,2094), 'days')], [-20339.00]],
1667   [[datediff(date.mdy(2,29,1900), date.mdy(2,29,1904), 'days')], [-1460.00]],
1668   [[datediff(date.mdy(2,29,1904), date.mdy(2,29,1908), 'days')], [-1461.00]],
1669   [[datediff(date.mdy(2,29,1900), date.mdy(2,28,1903), 'days')], [-1094.00]],
1670
1671   [[datediff(date.mdy(6,30,1680), date.mdy(6,10,1648), 'years')], [32.00]],
1672   [[datediff(date.mdy(7,24,1716), date.mdy(6,30,1680), 'years')], [36.00]],
1673   [[datediff(date.mdy(6,19,1768), date.mdy(7,24,1716), 'years')], [51.00]],
1674   [[datediff(date.mdy(8,2,1819), date.mdy(6,19,1768), 'years')], [51.00]],
1675   [[datediff(date.mdy(3,27,1839), date.mdy(8,2,1819), 'years')], [19.00]],
1676   [[datediff(date.mdy(4,19,1903), date.mdy(3,27,1839), 'years')], [64.00]],
1677   [[datediff(date.mdy(8,25,1929), date.mdy(4,19,1903), 'years')], [26.00]],
1678   [[datediff(date.mdy(9,29,1941), date.mdy(8,25,1929), 'years')], [12.00]],
1679   [[datediff(date.mdy(4,19,1943), date.mdy(9,29,1941), 'years')], [1.00]],
1680   [[datediff(date.mdy(10,7,1943), date.mdy(4,19,1943), 'years')], [0.00]],
1681   [[datediff(date.mdy(3,17,1992), date.mdy(10,7,1943), 'years')], [48.00]],
1682   [[datediff(date.mdy(2,25,1996), date.mdy(3,17,1992), 'years')], [3.00]],
1683   [[datediff(date.mdy(2,25,1996), date.mdy(9,29,1941), 'years')], [54.00]],
1684   [[datediff(date.mdy(4,19,43), date.mdy(9,29,1941), 'years')], [1.00]],
1685   [[datediff(date.mdy(10,7,43), date.mdy(4,19,43), 'years')], [0.00]],
1686   [[datediff(date.mdy(3,17,92), date.mdy(10,7,43), 'years')], [48.00]],
1687   [[datediff(date.mdy(2,25,96), date.mdy(3,17,92), 'years')], [3.00]],
1688   [[datediff(date.mdy(11,10,2038), date.mdy(2,25,96), 'years')], [42.00]],
1689   [[datediff(date.mdy(7,18,2094), date.mdy(11,10,2038), 'years')], [55.00]],
1690   [[datediff(date.mdy(2,29,1904), date.mdy(2,29,1900), 'years')], [3.00]],
1691   [[datediff(date.mdy(2,29,1908), date.mdy(2,29,1904), 'years')], [4.00]],
1692   [[datediff(date.mdy(2,28,1903), date.mdy(2,29,1900), 'years')], [2.00]],
1693
1694   [[datediff(date.mdy(6,30,1680), date.mdy(6,10,1648), 'months')], [384.00]],
1695   [[datediff(date.mdy(7,24,1716), date.mdy(6,30,1680), 'months')], [432.00]],
1696   [[datediff(date.mdy(6,19,1768), date.mdy(7,24,1716), 'months')], [622.00]],
1697   [[datediff(date.mdy(8,2,1819), date.mdy(6,19,1768), 'months')], [613.00]],
1698   [[datediff(date.mdy(3,27,1839), date.mdy(8,2,1819), 'months')], [235.00]],
1699   [[datediff(date.mdy(4,19,1903), date.mdy(3,27,1839), 'months')], [768.00]],
1700   [[datediff(date.mdy(8,25,1929), date.mdy(4,19,1903), 'months')], [316.00]],
1701   [[datediff(date.mdy(9,29,1941), date.mdy(8,25,1929), 'months')], [145.00]],
1702   [[datediff(date.mdy(4,19,1943), date.mdy(9,29,1941), 'months')], [18.00]],
1703   [[datediff(date.mdy(10,7,1943), date.mdy(4,19,1943), 'months')], [5.00]],
1704   [[datediff(date.mdy(3,17,1992), date.mdy(10,7,1943), 'months')], [581.00]],
1705   [[datediff(date.mdy(2,25,1996), date.mdy(3,17,1992), 'months')], [47.00]],
1706   [[datediff(date.mdy(2,25,1996), date.mdy(9,29,1941), 'months')], [652.00]],
1707   [[datediff(date.mdy(4,19,43), date.mdy(9,29,1941), 'months')], [18.00]],
1708   [[datediff(date.mdy(10,7,43), date.mdy(4,19,43), 'months')], [5.00]],
1709   [[datediff(date.mdy(3,17,92), date.mdy(10,7,43), 'months')], [581.00]],
1710   [[datediff(date.mdy(2,25,96), date.mdy(3,17,92), 'months')], [47.00]],
1711   [[datediff(date.mdy(11,10,2038), date.mdy(2,25,96), 'months')], [512.00]],
1712   [[datediff(date.mdy(7,18,2094), date.mdy(11,10,2038), 'months')], [668.00]],
1713   [[datediff(date.mdy(2,29,1904), date.mdy(2,29,1900), 'months')], [47.00]],
1714   [[datediff(date.mdy(2,29,1908), date.mdy(2,29,1904), 'months')], [48.00]],
1715   [[datediff(date.mdy(2,28,1903), date.mdy(2,29,1900), 'months')], [35.00]],
1716
1717   [[datediff(date.mdy(6,30,1680), date.mdy(6,10,1648), 'quarters')], [128.00]],
1718   [[datediff(date.mdy(7,24,1716), date.mdy(6,30,1680), 'quarters')], [144.00]],
1719   [[datediff(date.mdy(6,19,1768), date.mdy(7,24,1716), 'quarters')], [207.00]],
1720   [[datediff(date.mdy(8,2,1819), date.mdy(6,19,1768), 'quarters')], [204.00]],
1721   [[datediff(date.mdy(3,27,1839), date.mdy(8,2,1819), 'quarters')], [78.00]],
1722   [[datediff(date.mdy(4,19,1903), date.mdy(3,27,1839), 'quarters')], [256.00]],
1723   [[datediff(date.mdy(8,25,1929), date.mdy(4,19,1903), 'quarters')], [105.00]],
1724   [[datediff(date.mdy(9,29,1941), date.mdy(8,25,1929), 'quarters')], [48.00]],
1725   [[datediff(date.mdy(4,19,1943), date.mdy(9,29,1941), 'quarters')], [6.00]],
1726   [[datediff(date.mdy(10,7,1943), date.mdy(4,19,1943), 'quarters')], [1.00]],
1727   [[datediff(date.mdy(3,17,1992), date.mdy(10,7,1943), 'quarters')], [193.00]],
1728   [[datediff(date.mdy(2,25,1996), date.mdy(3,17,1992), 'quarters')], [15.00]],
1729   [[datediff(date.mdy(2,25,1996), date.mdy(9,29,1941), 'quarters')], [217.00]],
1730   [[datediff(date.mdy(4,19,43), date.mdy(9,29,1941), 'quarters')], [6.00]],
1731   [[datediff(date.mdy(10,7,43), date.mdy(4,19,43), 'quarters')], [1.00]],
1732   [[datediff(date.mdy(3,17,92), date.mdy(10,7,43), 'quarters')], [193.00]],
1733   [[datediff(date.mdy(2,25,96), date.mdy(3,17,92), 'quarters')], [15.00]],
1734   [[datediff(date.mdy(11,10,2038), date.mdy(2,25,96), 'quarters')], [170.00]],
1735   [[datediff(date.mdy(7,18,2094), date.mdy(11,10,2038), 'quarters')], [222.00]],
1736   [[datediff(date.mdy(2,29,1904), date.mdy(2,29,1900), 'quarters')], [15.00]],
1737   [[datediff(date.mdy(2,29,1908), date.mdy(2,29,1904), 'quarters')], [16.00]],
1738   [[datediff(date.mdy(2,28,1903), date.mdy(2,29,1900), 'quarters')], [11.00]])
1739
1740 CHECK_EXPR_EVAL([datesum],
1741 dnl DATESUM with non-leap year
1742   [[ctime.days(datesum(date.mdy(1,31,1900), 1, 'months') - date.mdy(1,1,1900))], [58.00]],
1743   [[ctime.days(datesum(date.mdy(1,31,1900), 2, 'months') - date.mdy(1,1,1900))], [89.00]],
1744   [[ctime.days(datesum(date.mdy(1,31,1900), 3, 'months') - date.mdy(1,1,1900))], [119.00]],
1745   [[ctime.days(datesum(date.mdy(1,31,1900), 4, 'months') - date.mdy(1,1,1900))], [150.00]],
1746   [[ctime.days(datesum(date.mdy(1,31,1900), 5.4, 'months') - date.mdy(1,1,1900))], [180.00]],
1747   [[ctime.days(datesum(date.mdy(1,31,1900), 6, 'months') - date.mdy(1,1,1900))], [211.00]],
1748   [[ctime.days(datesum(date.mdy(1,31,1900), 7, 'months') - date.mdy(1,1,1900))], [242.00]],
1749   [[ctime.days(datesum(date.mdy(1,31,1900), 8, 'months') - date.mdy(1,1,1900))], [272.00]],
1750   [[ctime.days(datesum(date.mdy(1,31,1900), 9, 'months') - date.mdy(1,1,1900))], [303.00]],
1751   [[ctime.days(datesum(date.mdy(1,31,1900), 10, 'months') - date.mdy(1,1,1900))], [333.00]],
1752   [[ctime.days(datesum(date.mdy(1,31,1900), 11, 'months') - date.mdy(1,1,1900))], [364.00]],
1753   [[ctime.days(datesum(date.mdy(1,31,1900), 12, 'months') - date.mdy(1,1,1900))], [395.00]],
1754   [[ctime.days(datesum(date.mdy(1,31,1900), 13.9, 'months') - date.mdy(1,1,1900))], [423.00]],
1755   [[ctime.days(datesum(date.mdy(1,31,1900), 1, 'months', 'rollover') - date.mdy(1,1,1900))], [61.00]],
1756   [[ctime.days(datesum(date.mdy(1,31,1900), 2, 'months', 'rollover') - date.mdy(1,1,1900))], [89.00]],
1757   [[ctime.days(datesum(date.mdy(1,31,1900), 3.2, 'months', 'rollover') - date.mdy(1,1,1900))], [120.00]],
1758   [[ctime.days(datesum(date.mdy(1,31,1900), 4, 'months', 'rollover') - date.mdy(1,1,1900))], [150.00]],
1759   [[ctime.days(datesum(date.mdy(1,31,1900), 5, 'months', 'rollover') - date.mdy(1,1,1900))], [181.00]],
1760   [[ctime.days(datesum(date.mdy(1,31,1900), 6, 'months', 'rollover') - date.mdy(1,1,1900))], [211.00]],
1761   [[ctime.days(datesum(date.mdy(1,31,1900), 7, 'months', 'rollover') - date.mdy(1,1,1900))], [242.00]],
1762   [[ctime.days(datesum(date.mdy(1,31,1900), 8, 'months', 'rollover') - date.mdy(1,1,1900))], [273.00]],
1763   [[ctime.days(datesum(date.mdy(1,31,1900), 9, 'months', 'rollover') - date.mdy(1,1,1900))], [303.00]],
1764   [[ctime.days(datesum(date.mdy(1,31,1900), 10, 'months', 'rollover') - date.mdy(1,1,1900))], [334.00]],
1765   [[ctime.days(datesum(date.mdy(1,31,1900), 11, 'months', 'rollover') - date.mdy(1,1,1900))], [364.00]],
1766   [[ctime.days(datesum(date.mdy(1,31,1900), 12, 'months', 'rollover') - date.mdy(1,1,1900))], [395.00]],
1767   [[ctime.days(datesum(date.mdy(1,31,1900), 13, 'months', 'rollover') - date.mdy(1,1,1900))], [426.00]],
1768
1769 dnl DATESUM with leap year
1770   [[ctime.days(datesum(date.mdy(1,31,1904), 1, 'months') - date.mdy(1,1,1904))], [59.00]],
1771   [[ctime.days(datesum(date.mdy(1,31,1904), 2.5, 'months') - date.mdy(1,1,1904))], [90.00]],
1772   [[ctime.days(datesum(date.mdy(1,31,1904), 3, 'months') - date.mdy(1,1,1904))], [120.00]],
1773   [[ctime.days(datesum(date.mdy(1,31,1904), 4.9, 'months') - date.mdy(1,1,1904))], [151.00]],
1774   [[ctime.days(datesum(date.mdy(1,31,1904), 5.1, 'months') - date.mdy(1,1,1904))], [181.00]],
1775   [[ctime.days(datesum(date.mdy(1,31,1904), 6, 'months') - date.mdy(1,1,1904))], [212.00]],
1776   [[ctime.days(datesum(date.mdy(1,31,1904), 7, 'months') - date.mdy(1,1,1904))], [243.00]],
1777   [[ctime.days(datesum(date.mdy(1,31,1904), 8, 'months') - date.mdy(1,1,1904))], [273.00]],
1778   [[ctime.days(datesum(date.mdy(1,31,1904), 9, 'months') - date.mdy(1,1,1904))], [304.00]],
1779   [[ctime.days(datesum(date.mdy(1,31,1904), 10, 'months') - date.mdy(1,1,1904))], [334.00]],
1780   [[ctime.days(datesum(date.mdy(1,31,1904), 11, 'months') - date.mdy(1,1,1904))], [365.00]],
1781   [[ctime.days(datesum(date.mdy(1,31,1904), 12, 'months') - date.mdy(1,1,1904))], [396.00]],
1782   [[ctime.days(datesum(date.mdy(1,31,1904), 13, 'months') - date.mdy(1,1,1904))], [424.00]],
1783   [[ctime.days(datesum(date.mdy(1,31,1904), 1, 'months', 'rollover') - date.mdy(1,1,1904))], [61.00]],
1784   [[ctime.days(datesum(date.mdy(1,31,1904), 2, 'months', 'rollover') - date.mdy(1,1,1904))], [90.00]],
1785   [[ctime.days(datesum(date.mdy(1,31,1904), 3, 'months', 'rollover') - date.mdy(1,1,1904))], [121.00]],
1786   [[ctime.days(datesum(date.mdy(1,31,1904), 4, 'months', 'rollover') - date.mdy(1,1,1904))], [151.00]],
1787   [[ctime.days(datesum(date.mdy(1,31,1904), 5, 'months', 'rollover') - date.mdy(1,1,1904))], [182.00]],
1788   [[ctime.days(datesum(date.mdy(1,31,1904), 6, 'months', 'rollover') - date.mdy(1,1,1904))], [212.00]],
1789   [[ctime.days(datesum(date.mdy(1,31,1904), 7, 'months', 'rollover') - date.mdy(1,1,1904))], [243.00]],
1790   [[ctime.days(datesum(date.mdy(1,31,1904), 8, 'months', 'rollover') - date.mdy(1,1,1904))], [274.00]],
1791   [[ctime.days(datesum(date.mdy(1,31,1904), 9, 'months', 'rollover') - date.mdy(1,1,1904))], [304.00]],
1792   [[ctime.days(datesum(date.mdy(1,31,1904), 10, 'months', 'rollover') - date.mdy(1,1,1904))], [335.00]],
1793   [[ctime.days(datesum(date.mdy(1,31,1904), 11, 'months', 'rollover') - date.mdy(1,1,1904))], [365.00]],
1794   [[ctime.days(datesum(date.mdy(1,31,1904), 12, 'months', 'rollover') - date.mdy(1,1,1904))], [396.00]],
1795   [[ctime.days(datesum(date.mdy(1,31,1904), 13, 'months', 'rollover') - date.mdy(1,1,1904))], [427.00]],
1796
1797   [[ctime.days(datesum(date.mdy(6,10,1648), 1, 'weeks') - date.mdy(6,10,1648))], [7.00]],
1798   [[ctime.days(datesum(date.mdy(6,30,1680), 2.5, 'weeks') - date.mdy(6,30,1680))], [17.50]],
1799   [[ctime.days(datesum(date.mdy(7,24,1716), -3, 'weeks') - date.mdy(7,24,1716))], [-21.00]],
1800   [[ctime.days(datesum(date.mdy(6,19,1768), 4, 'weeks') - date.mdy(6,19,1768))], [28.00]],
1801   [[ctime.days(datesum(date.mdy(8,2,1819), 5, 'weeks') - date.mdy(8,2,1819))], [35.00]],
1802
1803   [[ctime.days(datesum(date.mdy(6,10,1648), 1, 'days') - date.mdy(6,10,1648))], [1.00]],
1804   [[ctime.days(datesum(date.mdy(6,30,1680), 2.5, 'days') - date.mdy(6,30,1680))], [2.50]],
1805   [[ctime.days(datesum(date.mdy(7,24,1716), -3, 'days') - date.mdy(7,24,1716))], [-3.00]],
1806   [[ctime.days(datesum(date.mdy(6,19,1768), 4, 'days') - date.mdy(6,19,1768))], [4.00]],
1807   [[ctime.days(datesum(date.mdy(8,2,1819), 5, 'days') - date.mdy(8,2,1819))], [5.00]],
1808   [[ctime.days(datesum(date.mdy(6,10,1648), 1, 'hours') - date.mdy(6,10,1648))], [0.04]],
1809   [[ctime.days(datesum(date.mdy(6,30,1680), 2.5, 'hours') - date.mdy(6,30,1680))], [0.10]],
1810   [[ctime.days(datesum(date.mdy(6,19,1768), -4, 'hours') - date.mdy(6,19,1768))], [-0.17]],
1811   [[ctime.days(datesum(date.mdy(8,2,1819), 5, 'hours') - date.mdy(8,2,1819))], [0.21]])
1812
1813 CHECK_EXPR_EVAL([miscellaneous],
1814 dnl These test values are from Applied Statistics, Algorithm AS 310.
1815   [[1000 * ncdf.beta(.868,10,20,150)], [937.66]],
1816   [[1000 * ncdf.beta(.9,10,10,120)], [730.68]],
1817   [[1000 * ncdf.beta(.88,15,5,80)], [160.43]],
1818   [[1000 * ncdf.beta(.85,20,10,110)], [186.75]],
1819   [[1000 * ncdf.beta(.66,20,30,65)], [655.94]],
1820   [[1000 * ncdf.beta(.72,20,50,130)], [979.69]],
1821   [[1000 * ncdf.beta(.72,30,20,80)], [116.24]],
1822   [[1000 * ncdf.beta(.8,30,40,130)], [993.04]],
1823
1824 dnl FIXME: LAG
1825 dnl
1826   [[X], [1.00], [], [(X = 1.00)]],
1827   [[SYSMIS(1)], [false]],
1828   [[SYSMIS($SYSMIS)], [true]],
1829   [[SYSMIS(1 + $SYSMIS)], [true]],
1830
1831 dnl FIXME: out-of-range and nearly out-of-range values on dates
1832 dnl
1833 dnl Tests correctness of generic optimizations in optimize_tree().
1834   [[x + 0], [10.00], [], [(X = 10.00)]],
1835   [[x - 0], [-3.00], [], [(X = -3.00)]],
1836   [[0 + x], [5.00], [], [(X = 5.00)]],
1837   [[x * 1], [10.00], [], [(X = 10.00)]],
1838   [[1 * x], [-3.00], [], [(X = -3.00)]],
1839   [[x / 1], [5.00], [], [(X = 5.00)]],
1840   [[0 * x], [0.00], [], [(X = 10.00)]],
1841   [[x * 0], [0.00], [], [(X = -3.00)]],
1842   [[0 / x], [0.00], [], [(X = 5.00)]],
1843   [[mod(0, x)], [0.00], [], [(X = 5.00)]],
1844   [[x ** 1], [5.00], [], [(X = 5.00)]],
1845   [[x ** 2], [25.00], [], [(X = 5.00)]])
1846
1847 AT_SETUP([LAG function])
1848 AT_DATA([lag.sps], [dnl
1849 data list /W 1.
1850 begin data.
1851 1
1852 2
1853 3
1854 4
1855 5
1856 end data.
1857
1858 compute X=lag(w,1).
1859 compute Y=lag(x).
1860 compute Z=lag(w,2).
1861 list.
1862 ])
1863 AT_CHECK([pspp -o pspp.csv lag.sps])
1864 AT_CHECK([cat pspp.csv], [0], [dnl
1865 Table: Reading 1 record from INLINE.
1866 Variable,Record,Columns,Format
1867 W,1,1-  1,F1.0
1868
1869 Table: Data List
1870 W,X,Y,Z
1871 1,.  ,.  ,.  @&t@
1872 2,1.00,.  ,.  @&t@
1873 3,2.00,1.00,1.00
1874 4,3.00,2.00,2.00
1875 5,4.00,3.00,3.00
1876 ])
1877 AT_CLEANUP
1878
1879 AT_SETUP([LAG crash bug])
1880 AT_DATA([lag.sps], [dnl
1881 DATA LIST LIST /x.
1882 BEGIN DATA
1883
1884
1885 END DATA.
1886
1887 DO IF (x <> LAG(x) ).
1888         ECHO 'hello'.
1889 END IF.
1890
1891 EXECUTE.
1892 ])
1893 AT_CHECK([pspp -o pspp.csv lag.sps])
1894 AT_CHECK([cat pspp.csv], [0], [dnl
1895 Table: Reading free-form data from INLINE.
1896 Variable,Format
1897 x,F8.0
1898
1899 hello
1900 ])
1901 AT_CLEANUP
1902
1903 dnl Tests for a bug which caused UNIFORM(x) to always return zero.
1904 AT_SETUP([UNIFORM function])
1905 AT_DATA([uniform.sps], [dnl
1906 set seed=10.
1907 input program.
1908 + loop #i = 1 to 20.
1909 +    do repeat response=R1.
1910 +       compute response = uniform(10).
1911 +    end repeat.
1912 +    end case.
1913 + end loop.
1914 + end file.
1915 end input program.
1916
1917 list.
1918 ])
1919 AT_CHECK([pspp -o pspp.csv uniform.sps])
1920 AT_CHECK([cat pspp.csv], [0], [dnl
1921 Table: Data List
1922 R1
1923 7.71
1924 2.99
1925 .21
1926 4.95
1927 6.34
1928 4.43
1929 7.49
1930 8.32
1931 4.99
1932 5.83
1933 2.25
1934 .25
1935 1.98
1936 7.09
1937 7.61
1938 2.66
1939 1.69
1940 2.64
1941 .88
1942 1.50
1943 ])
1944 AT_CLEANUP
1945
1946 AT_SETUP([VALUELABEL function])
1947 AT_DATA([valuelabel.sps], [dnl
1948 DATA LIST notable /n 1 s 2(a).
1949 VALUE LABELS /n 0 'Very dissatisfied'
1950                 1 'Dissatisfied'
1951                 1.5 'Slightly Peeved'
1952                 2 'Neutral'
1953                 3 'Satisfied'
1954                 4 'Very satisfied'.
1955 VALUE LABELS /s 'a' 'Wouldn''t buy again'
1956                 'b' 'Unhappy'
1957                 'c' 'Bored'
1958                 'd' 'Satiated'
1959                 'e' 'Elated'.
1960 STRING nlabel slabel(a10).
1961 COMPUTE nlabel = VALUELABEL(n).
1962 COMPUTE slabel = VALUELABEL(s).
1963 LIST.
1964 BEGIN DATA.
1965
1966 0a
1967 1b
1968 2c
1969 3d
1970 4e
1971 5f
1972 6g
1973 END DATA.
1974 ])
1975 AT_CHECK([pspp -o pspp.csv valuelabel.sps])
1976 AT_CHECK([cat pspp.csv], [0], [dnl
1977 Table: Data List
1978 n,s,nlabel,slabel
1979 .,,,
1980 0,a,Very dissa,Wouldn't b
1981 1,b,Dissatisfi,Unhappy   @&t@
1982 2,c,Neutral   ,Bored     @&t@
1983 3,d,Satisfied ,Satiated  @&t@
1984 4,e,Very satis,Elated    @&t@
1985 5,f,,
1986 6,g,,
1987 ])
1988 AT_CLEANUP
1989
1990 AT_SETUP([variables in expressions])
1991 AT_DATA([variables.sps], [dnl
1992 DATA LIST NOTABLE/N1 TO N5 1-5.
1993 MISSING VALUES N1 TO N5 (3 THRU 5, 1).
1994 BEGIN DATA.
1995 12345
1996 6789 
1997 END DATA.
1998
1999 COMPUTE P1=N1.
2000 COMPUTE P2=N2.
2001 COMPUTE P3=N3.
2002 COMPUTE P4=N4.
2003 COMPUTE P5=N5.
2004
2005 COMPUTE MC=NMISS(N1 TO N5).
2006 COMPUTE VC=NVALID(N1 TO N5).
2007
2008 COMPUTE S1=SYSMIS(N1).
2009 COMPUTE S2=SYSMIS(N2).
2010 COMPUTE S3=SYSMIS(N3).
2011 COMPUTE S4=SYSMIS(N4).
2012 COMPUTE S5=SYSMIS(N5).
2013
2014 COMPUTE M1=MISSING(N1).
2015 COMPUTE M2=MISSING(N2).
2016 COMPUTE M3=MISSING(N3).
2017 COMPUTE M4=MISSING(N4).
2018 COMPUTE M5=MISSING(N5).
2019
2020 COMPUTE V1=VALUE(N1).
2021 COMPUTE V2=VALUE(N2).
2022 COMPUTE V3=VALUE(N3).
2023 COMPUTE V4=VALUE(N4).
2024 COMPUTE V5=VALUE(N5).
2025
2026 FORMATS ALL (F1).
2027
2028 LIST.
2029 ])
2030 AT_CHECK([pspp -o pspp.csv variables.sps])
2031 AT_CHECK([cat pspp.csv], [0], [dnl
2032 Table: Data List
2033 N1,N2,N3,N4,N5,P1,P2,P3,P4,P5,MC,VC,S1,S2,S3,S4,S5,M1,M2,M3,M4,M5,V1,V2,V3,V4,V5
2034 1,2,3,4,5,.,2,.,.,.,4,1,0,0,0,0,0,1,0,1,1,1,1,2,3,4,5
2035 6,7,8,9,.,6,7,8,9,.,1,4,0,0,0,0,1,0,0,0,0,1,6,7,8,9,.
2036 ])
2037 AT_CLEANUP
2038
2039 AT_SETUP([vectors in expressions])
2040 AT_DATA([vectors.sps], [dnl
2041 DATA LIST NOTABLE /N1 TO N5 1-5.
2042 MISSING VALUES N1 TO N5 (3 THRU 5, 1).
2043 BEGIN DATA.
2044 12345
2045 6789 
2046 END DATA.
2047
2048 VECTOR N=N1 TO N5.
2049 VECTOR X(5).
2050 LOOP I=1 TO 5.
2051 COMPUTE X(I)=N(I) + 1.
2052 END LOOP.
2053
2054 FORMATS ALL (F2).
2055
2056 LIST.
2057 ])
2058 AT_CHECK([pspp -o pspp.csv vectors.sps])
2059 AT_CHECK([cat pspp.csv], [0], [dnl
2060 Table: Data List
2061 N1,N2,N3,N4,N5,X1,X2,X3,X4,X5,I
2062 1,2,3,4,5,.,3,.,.,.,5
2063 6,7,8,9,.,7,8,9,10,.,5
2064 ])
2065 AT_CLEANUP