Function xsGetAt

Get a property or item of an array instance with a specified name, index or symbol.

xs.bindings.xsSlotRecord xsGetAt (
  scope xs.bindings.xsMachineRecord* the,
  const(xs.bindings.xsSlotRecord) this_,
  const(xs.bindings.xsSlotRecord) key
);

Parameters

NameDescription
theA machine
this_A reference to the object that has the property or item
keyThe key of the property or item to get

Returns

A slot containing what is contained in the property or item, or xsUndefined if the property or item is not defined by the instance or its prototypes

Examples

In ECMAScript:

this.foo[3]

In D:

xsVars(2);
xsVar(0) = xsGet(xsThis, xsID_foo);
xsVar(1) = xsGetAt(xsVar(0), xsInteger(3));