setitem
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
| — | setitem [2006/08/29 16:08] (current) – created - external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | # $EPIC: setitem.txt, | ||
| + | ======Synopsis: | ||
| + | $__setitem__(< | ||
| + | |||
| + | ======Technical: | ||
| + | This function creates a new cell in the specified array. | ||
| + | does not exist, the client will try to create it. | ||
| + | |||
| + | ======Practical: | ||
| + | This function is the single doorway into EPIC's arrays. | ||
| + | to create or add to an array. | ||
| + | consisting of any characters (even spaces, if escaped) and being of any | ||
| + | length. | ||
| + | names to printable characters. | ||
| + | |||
| + | The item number is the cell in which to place the new data. It must be | ||
| + | no higher than the number of the next available cell (see $[[numitems]]() | ||
| + | for a trick to get this). | ||
| + | the array is to be created, the item number must be 0 (zero). | ||
| + | all array items are numbered from 0. | ||
| + | |||
| + | The data may be anything at all. The client will preserve the case of | ||
| + | any data entered. | ||
| + | |||
| + | ======Returns: | ||
| + | < | ||
| + | -2 could not find item number, or item number too large | ||
| + | -1 could not find array, or item number not 0 for new array | ||
| + | | ||
| + | | ||
| + | | ||
| + | </ | ||
| + | |||
| + | ======Examples: | ||
| + | $setitem(foo 1 blah) | ||
| + | $setitem(foo 0 blah blah) returns 1, new array created | ||
| + | $setitem(foo 1 fubar booya) | ||
| + | $setitem(foo 5 booya) | ||
| + | $setitem(foo 0 ha ha) returns 0, item overwritten | ||
setitem.txt · Last modified: 2006/08/29 16:08 by 127.0.0.1
