suve

awful: function: arr-flush

Declaration

int :dict-flush ( array &ARR )
int :dict-flush ( dict &DICT )
int :arr-flush ( array &ARR )
int :arr-flush ( dict &DICT )

Summary

Removes (unsets) all entries in an array or dictionary. The value should be passed by reference for the function to work properly. Can be passed multiple arguments. Value returned is the number of entries unset.

Example

# :arr-flush example.
:set &A :arr i0 i1 i2
:writeln s'count: ' :arr-count &A
:writeln s'flush: ' :arr-flush &A
:writeln s'count: ' :arr-count &A

wikistrona zmodyfikowana 2014/0601/2316