Function xsSetAt
Set a property or item of an array instance by key.
void xsSetAt
(
scope xs .bindings .xsMachineRecord* the,
const(xs .bindings .xsSlotRecord) this_,
const(xs .bindings .xsSlotRecord) key,
const(xs .bindings .xsSlotRecord) slot
);
Parameters
Name | Description |
---|---|
the | A machine |
this_ | A reference to the object that has the property or item |
key | The key of the property or item to set |
slot | The value of the property or item to set |
Examples
In ECMAScript:
this .foo[3] = 7
In D:
xsVars(1);
xsVar(0) = xsGet(xsThis, xsID_foo);
xsSetAt(xsVar(0), xsInteger(3), xsInteger(7));