Re: natural?

new topic     » goto parent     » topic index » view thread      » older message » newer message
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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu