map_delete.3

foundation2_fluffos_v1/lib/doc/driver/efuns/mappings/map_delete.3 · 867 B

From the archive foundation2_fluffos_v1.zip

Download the archive   « Back to the archive contents

.\"remove a (key, value) pair from a mapping based on the key
.TH map_delete 3 "5 Sep 1994" MudOS "LPC Library Functions"

.SH NAME
map_delete() - remove a (key, value) pair from a mapping based on the key

.SH SYNOPSIS
void map_delete( mapping m, mixed element );

.SH DESCRIPTION
map_delete removes the (key, value) from the mapping m that has key equal
to element.
.PP
For example, given:
.IP
.nf
mapping names;

names = ([]);
names["truilkan"] = "john";
names["wayfarer"] = "erik";
names["jacques"] = "dwayne";
.fi
.PP
Then:
.IP
.nf
map_delete(names,"truilkan");
.fi
.PP
causes the mapping 'names' to be equal to:
.IP
.nf
(["wayfarer" : "erik", "jacques" : "dwayne"])
.fi
.PP
keys(names) will not contain "truilkan" after map_delete(names,"truilkan")
is called [unless ("truilkan", *) is subsequently added back to the mapping].

.SH SEE ALSO
allocate_mapping(3)

Site Stats

Snippets: 1791
Codebases: 571