SourceForge.net Logo

Euphoria Standard Library
(ESL)

Home Page | Project Status | Contribute | Guidelines and Information



Euphoria Standard Library module:

numtypes.e



1. Introduction


This module is a collection of global types for restricting the possible values of numbers. Currently they are proposed to handle both atoms and sequences but there is a chance this behavior might be changed.



2. Types

even, even_number

Syntax: even(x)
Description: Returns TRUE if and only if x is an even number.
Status: PROPOSED


negative_atom

Syntax: negative_atom(x)
Description: Returns TRUE if and only if x is an atom < 0.
Status: PROPOSED


negative_integer

Syntax: negative_integer(x)
Description: Returns TRUE if and only if x is an integer < 0.
Status: PROPOSED


nonnegative_atom

Syntax: nonnegative_atom(x)
Description: Returns TRUE if and only if x is an atom >= 0.
Status: PROPOSED


nonnegative_integer

Syntax: nonnegative_integer(x)
Description: Returns TRUE if and only if x is an integer >= 0.
Status: PROPOSED


nonpositive_atom

Syntax: nonpositive_atom(x)
Description: Returns TRUE if and only if x is an atom <= 0.
Status: PROPOSED


nonpositive_integer

Syntax: nonpositive_integer(x)
Description: Returns TRUE if and only if x is an integer <= 0.
Status: PROPOSED


odd, odd_number

Syntax: odd(x)
Description: Returns TRUE if and only if x is an odd number.
Status: PROPOSED


point_2d

Syntax: point_2d(x)
Description: Returns TRUE if and only if x is a sequence that consists of 2 atoms (representing the x and y coordinates of a point on a plane).
Status: PROPOSED


point_3d

Syntax: point_3d(x)
Description: Returns TRUE if and only if x is a sequence that consists of 3 atoms (representing the x, y and z coordinates of a point).
Status: PROPOSED



positive_atom

Syntax: positive_atom(x)
Description: Returns TRUE if and only if x is an atom > 0.


positive_integer

Syntax: positive_integer(x)
Description: Returns TRUE if and only if x is an integer > 0.
Status: PROPOSED