Home   Help Search Login Register  

Author Topic: Updating nth element of an array  (Read 963 times)

0 Members and 1 Guest are viewing this topic.

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Updating nth element of an array
« on: 18 Apr 2005, 18:21:56 »
I have done a search and I have done some experimenting but I can find no answer.

Is there a simple way to update the nth element of an array.  In case I am not  being clear the following line does not work but it does illustrate what I am trying to do:

arrayname select _n = newvalue

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Updating nth element of an array
« Reply #1 on: 18 Apr 2005, 18:59:49 »
How about:

array set [indexnumber, value]


Planck
« Last Edit: 18 Apr 2005, 19:53:18 by Planck »
I know a little about a lot, and a lot about a little.

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Updating nth element of an array
« Reply #2 on: 18 Apr 2005, 19:12:43 »
Planck:  Thank you.  Now I know I can find it easily in the Comref :-[

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Updating nth element of an array
« Reply #3 on: 18 Apr 2005, 20:09:09 »
Editing/Scripting: Advanced? :P

And solve ye topic, bugger. :-*

:beat: *Gets Shot* :beat:

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Updating nth element of an array
« Reply #4 on: 18 Apr 2005, 21:21:16 »
Solve it!  I would like to delete it!!