Implement range/3 in C for consistent error handling (#3267)
This commit is contained in:
1 parent
dd409de28d
commit
e371bfaa92
4 files changed
+46
-27
No files matched your search
@@ -304,10 +304,30 @@ null
|
||||
null
|
||||
[0,-1,-2,-3,-4]
|
||||
|
||||
[range(0;-10;-3)]
|
||||
null
|
||||
[0,-3,-6,-9]
|
||||
|
||||
[range(0;10;0)]
|
||||
null
|
||||
[]
|
||||
|
||||
[range(0,1;4,5;1,2)]
|
||||
null
|
||||
[0,1,2,3,0,2, 0,1,2,3,4,0,2,4, 1,2,3,1,3, 1,2,3,4,1,3]
|
||||
|
||||
try range(.) catch .
|
||||
null
|
||||
"Range bounds and step must be numeric"
|
||||
|
||||
try range(0;"") catch .
|
||||
null
|
||||
"Range bounds and step must be numeric"
|
||||
|
||||
try range(0;1;[]) catch .
|
||||
null
|
||||
"Range bounds and step must be numeric"
|
||||
|
||||
[while(.<100; .*2)]
|
||||
1
|
||||
[1,2,4,8,16,32,64]
|
||||
|
||||
Reference in new issue
Block a user