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_DefineConstDoubles (Function)
Summary:     Creates one or more constant double-valued properties for an object.
Syntax:
JSBool JS_DefineConstDoubles(JSContext *cx, JSObject *obj,
JSConstDoubleSpec *cds);

     Argument     Type     Description
     cx     JSContext *     Pointer to a JS context from which to derive runtime information.
                 
     obj     JSObject *     Object for which to create new properties.
                 
     *cds     JSConstDoubleSpec *     Pointer to an array of structs containing double property values and property names to create. The last array element must contain zero-valued members.
                 
Description:
JS_DefineConstDoubles creates one or more properties for a specified object, obj, where each property consists of a double value. Each property is automatically assigned attributes as specified in the flags field of the JSConstDoubleSpec struct pointed to by cds. If flags is set to zero, the attributes for the property are automatically set to JSPROP_PERMANENT | JSPROP_READONLY.

cds is a pointer to the first element of an array of JSConstDoubleSpecs. Each array element defines a single property name and property value to create. The name field of last element of the array must contain a zero value. JS_DefineConstDoubles creates one property for each element in the array what contains a non-zero name field.

If successful, JS_DefineConstDoubles returns JS_TRUE, indicating it has created all properties listed in the array. Otherwise it returns JS_FALSE.


See also:
JSConstDoubleSpec
JS_DefineElement
JS_DefineFunction
JS_DefineFunctions
JS_DefineObject
JS_DefineProperties
JS_DefineProperty
JS_DefinePropertyWithTinyId

[sh-index] Back to list of manuals