Re: natural?
- Posted by mattlewis (admin) Feb 28, 2014
- 1766 views
useless_ said...
What does the word "natural" mean in function parameters?
It's meant to be a natural number. Interestingly, I see it is defined in several places (and slightly differently) in the standard library. Those should probably be combined, although they are currently local types.
-- std/get.e type natural(integer x) return x >= 0 end type -- std/safe.e type natural(object x) if not integer(x) then return 0 end if return x >= 0 end type -- std/net/http.e type natural(integer n) return n>=0 end type
Matt