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

NameDescription
theA machine
this_A reference to the object that has the property or item
keyThe key of the property or item to set
slotThe 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));