Function xsDelete
Delete a property or item of an instance.
void xsDelete
(
scope xs .bindings .xsMachineRecord* the,
const(xs .bindings .xsSlotRecord) this_,
int key
);
If the property or item is not defined by the instance, this macro has no effect.
Parameters
Name | Description |
---|---|
the | A machine |
this_ | A reference to the instance that has the property or item |
key | The key of the property or item to delete |
Examples
In ECMAScript:
delete foo
delete this .foo
delete this[0]
In D:
the .xsDelete(xsGlobal, xsID_foo);
the .xsDelete(xsThis, xsID_foo);
the .xsDelete(xsThis, 0);