Assigning Values to an Array: Difference between revisions

From Rosetta Code
Content added Content deleted
(Split from multifunction Array task.)
 
(Blank page since people can't / don't read)
 
(176 intermediate revisions by 91 users not shown)
Line 1: Line 1:
{{task}}
{{DeprecatedTask}}


'''Please do not add new code, and move existing code to the [[Arrays]] task.'''
In this task, the goal is to assign a value to an element of an [[array]].


In this task, the goal is to assign a value to an element of an [[array]]. The value should only replace an existing value, and not insert a new key should the key not exist. If the key does not exist, an error should be returned.
==[[mIRC]]==
'''Interpeter:''' mIRC Script Editor
'''Library:''' [[mArray Snippet]]
alias write2array { echo -a $array_write(MyArray, 2, 3, Rosetta) }

Latest revision as of 15:06, 29 November 2019

Assigning Values to an Array was a programming task. It has been deprecated for reasons that are discussed in its talk page.

Please do not add new code, and move existing code to the Arrays task.

In this task, the goal is to assign a value to an element of an array. The value should only replace an existing value, and not insert a new key should the key not exist. If the key does not exist, an error should be returned.