Category talk:Wren-long: Difference between revisions
→Source code: Constructors no longer permitted to return values so changed to static methods instead.
(→Source code: Bug fix.) |
(→Source code: Constructors no longer permitted to return values so changed to static methods instead.) |
||
Line 214:
}
// Private
// If 'v' is not small, will probably lose accuracy.
if (v < 0 || v.isNan) return ULong.zero
var m = 4294967296 // 2 ^ 32
Line 223:
}
// Private
// Scientific notation is permitted.
// Raises an error if the result is out of bounds.
v = v.trim()
if (v.count == 0 || v[0] == "-") Fiber.abort("Invalid unsigned integer.")
Line 284:
// Scientific notation is not permitted.
// Wraps out of range values.
if (!(v is String)) Fiber.abort("Value must be a numeric string in the given base.")
if (!((base is Num) && base.isInteger && base >= 2 && base <= 36)) {
|