AcornSearch - Acorn and RISC OS information searching
RISC OS Search
containing
"Nutty quip goes here!"
Home  |  About  |  Filebase Archive  |  StrongHelp Manuals  |  Newsgroups  |  Module Database
Entry:     JSVAL_IS_NUMBER (Macro)
Summary:     Determines if a specified value is a JS integer or double.
Syntax:
JSVAL_IS_NUMBER(v)

Description:
Use JSVAL_IS_NUMBER to determine if a given JS value, v, is an integer or double value. If the type tag for v is JSVAL_INT or JSVAL_DOUBLEJSVAL_IS_NUMBER evaluates to true. Otherwise, it evaluates to false. These return types are C values, not JS Boolean values.


Example:
The following code snippet illustrates how a JavaScript variable, MyItem, is conditionally tested in an if statement to see if it is a JS integer or double value.

if (JSVAL_IS_NUMBER(MyItem)) {
. . .
}


See also:
JSVAL_IS_BOOLEAN
JSVAL_IS_DOUBLE
JSVAL_IS_INT
JSVAL_IS_NULL
JSVAL_IS_OBJECT
JSVAL_IS_PRIMITIVE
JSVAL_IS_PRIMITIVE
JSVAL_IS_STRING
JSVAL_IS_VOID

[sh-index] Back to list of manuals