Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Moving an element...

From: al:bri:xtra at: 28-Sep-2001 4:12

> I have thefollowing > names:[ > "Mike" > "Helen" > "George" > "Liz" > "Tom"] > How can I move the first element to the fourth position and generally what
will hapen?
>> Names: ["Mike" "Helen" "George" "Liz" "Tom"]
== ["Mike" "Helen" "George" "Liz" "Tom"]
>> Name: pop Names
== "Mike"
>> insert at Names 3 Name
== ["Liz" "Tom"]
>> names
== ["Helen" "George" "Mike" "Liz" "Tom"] You might have to change the 3 to 4 or 2 depending upon your intent. Source for 'pop was published earlier. Andrew Martin ICQ: 26227169 http://zen.scripterz.org