@@ -7,6 +7,7 @@ print bool(null);
7
7
print ' -- int' ;
8
8
print int (123 );
9
9
print int (null );
10
+ print int (' 4' ); -- { clientError BAD_ARGUMENTS }
10
11
print ' -- long' ;
11
12
print long(123 );
12
13
print long(0xff);
@@ -19,6 +20,7 @@ print real(null);
19
20
print real (nan);
20
21
print real (+ inf);
21
22
print real (- inf);
23
+ print double(' 4.2' ); -- { clientError BAD_ARGUMENTS }
22
24
print ' -- datetime' ;
23
25
print datetime(2015 - 12 - 31 23 :59 :59 .9 );
24
26
print datetime(2015 - 12 - 31 );
@@ -29,32 +31,34 @@ print datetime('2014-11-08');
29
31
print datetime(null );
30
32
print datetime(' 2014-05-25T08:20:03.123456Z' );
31
33
print datetime(' 2014-11-08 15:55:55.123456Z' );
32
- print ' -- time'
34
+ print ' -- time' ;
33
35
print time (' 14.02:03:04.12345' );
34
36
print time (' 12:30:55.123' );
35
37
print time (1d);
36
38
print time (- 1d);
37
39
print time (6nanoseconds);
38
- print time (6tick);
40
+ -- print time(6tick); == 6e-7
39
41
print ' -- guid'
40
- print guid(74be27de- 1e4e- 49d9- b579- fe0b331d3642)
41
- -- print guid(null)
42
+ print guid(74be27de- 1e4e- 49d9- b579- fe0b331d3642);
43
+ print guid(null );
42
44
print ' -- timespan (time)' ;
43
- print timespan(2d); -- 2 days
44
- print timespan(1 .5h); -- 1.5 hour
45
- print timespan(30m); -- 30 minutes
46
- print timespan(10s); -- 10 seconds
47
- print timespan(0 .1s); -- 0.1 second
48
- print timespan(100ms); -- 100 millisecond
45
+ print timespan(2d); -- 2 days
46
+ print timespan(1 .5h); -- 1.5 hour
47
+ print timespan(30m); -- 30 minutes
48
+ print timespan(10s); -- 10 seconds
49
+ print timespan(0 .1s); -- 0.1 second
50
+ print timespan(100ms); -- 100 millisecond
49
51
print timespan(10microsecond); -- 10 microseconds
50
- print timespan(1tick);
52
+ -- print timespan(1tick); -- 100 nanoseconds -> 1e-7
51
53
print timespan(1 .5h) / timespan(30m);
54
+ print timespan(' 12.23:12:23' ) / timespan(1s);
52
55
print ' -- null' ;
53
56
print isnull(null );
54
57
print bool(null ), int (null ), long(null ), real (null ), double(null );
55
58
print ' -- decimal' ;
56
59
print decimal (null );
57
60
print decimal (123 .345 );
61
+ print decimal (1e5);
58
62
print ' -- dynamic' ; -- no support for mixed types and bags for now
59
63
print dynamic(null );
60
64
print dynamic(1 );
@@ -97,12 +101,14 @@ print '-- make_timespan()';
97
101
print v1= make_timespan(1 ,12 ), v2= make_timespan(1 ,12 ,30 ), v3= make_timespan(1 ,12 ,30 ,55 .123 );
98
102
print ' -- totimespan()' ;
99
103
print totimespan(' 0.00:01:00' );
104
+ print totimespan(' abc' );
105
+ print totimespan(' 12.23:12:23' ) / totimespan(1s);
106
+ -- print totimespan(strcat('12.', '23', ':12:', '23')) / timespan(1s); -> 1120343
100
107
print ' -- tolong()' ;
101
108
print tolong(' 123' );
102
109
print tolong(' abc' );
103
110
print ' -- todecimal()' ;
104
111
print todecimal(123 .345 );
105
112
print todecimal(null );
106
- -- TODO:
107
- -- print totimespan('abc') == null;
108
-
113
+ print todecimal(' abc' );
114
+ -- print todecimal(4 * 2 + 3); -> 11
0 commit comments