Fixed number function not returning list length (#1100)

* Fixed number function not returning list length

* Fixed whitespace
This commit is contained in:
Alexis Tio authored and GitHub committed 2021-10-11 02:34:46 -03:00
1 parent 736c10abe6
commit 85464d8b95
1 file changed
+4
@@ -56,6 +56,10 @@ public class Sys {
if (num.isInteger()) return new NumericValue(num.getLong());
return new NumericValue(num.getDouble());
}
if (v instanceof ListValue listVal)
{
return new NumericValue(listVal.length());
}
try
{
return new NumericValue(v.getString());