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:     JS_NewDoubleValue (Function)
Summary:     Creates a JS value based on a JS double.
Syntax:
JSBool JS_NewDoubleValue(JSContext *cx, jsdouble d,
jsval *rval);

     Argument     Type     Description
     cx     JSContext *     Pointer to a JS context from which to derive runtime information.
                 
     d     jsdouble     An existing double to assign as a value to the jsval.
                 
     rval     jsval *     Pointer to a previously declared jsval into which to store the double value.
                 
Description:
JS_NewDoubleValue creates a jsval containing a double value that corresponds to the double passed in as an argument. cx is the executable script context in which this call is made. d is the double value to assign to the jsval, and rval is the jsval into which the new JS double value is stored. Space for the new value is allocated from the JS garbage collection heap.

JS_NewDoubleValue attempts to creates a temporary copy of the double value. If the copy is successful, then the jsval is created, and the function returns JS_TRUE.Otherwise it returns JS_FALSE.


See also:
JS_AddRoot
JS_NewNumberValue

[sh-index] Back to list of manuals