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_NewArrayObject (Function)
Summary:     Creates a new array object.
Syntax:
JSObject * JS_NewArrayObject(JSContext *cx, jsint length,
jsval *vector);

     Argument     Type     Description
     cx     JSContext *     Pointer to a JS context from which to derive runtime information.
                 
     length     jsint     Number of elements to include in the array.
                 
     vector     jsval *     Pointer to the initial values for the array's elements.
                 
Description:
JS_NewArrayObject creates a new array object in the JSRuntime of the specified JSContextcx. If array creation is successful, JS_NewArrayObject initializes each element identified by index i from 0 to length - 1 to have the value vector[i], and then returns a pointer to the new object. Otherwise JS_NewArrayObject returns NULL.

length specifies the number of elements in the array. If length is 0JS_NewArrayObject creates an array object of length 0 and ignores vector.

See also:
JS_AliasElement
JS_DefineElement
JS_DeleteElement
JS_GetArrayLength
JS_GetElement
JS_IsArrayObject
JS_LookupElement
JS_SetArrayLength
JS_SetElement

[sh-index] Back to list of manuals