delete. Delete object's field   [3.4.2]

^reflection:delete[object;field name]
^reflection:delete[class;field name]

Delete a field with specified field name for specified object or class.

Example
@main[][a;h]
$a[^a::create[]]
^reflection:delete[$a;b]

$h[^hash::create[$x]]
^h.foreach[k;v]{$k='$v'}[, ]


@CLASS
a

@create[]
$a[1]
$b[2]
$c[3]


Returns:
a='1', c='3'



Copyright © 1997–2021 Art. Lebedev Studio | http://www.artlebedev.com Last updated: 18.06.2012