EnglishGermanFrenchRussianItalianSpanish
Log inRegister
 
insert <Value> into array <Var/Array> at index <Var/Number>
Post new topic This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic
Author Message
mark_a_condren





Joined: 03 Aug 2005
Posts: 1385 on topic
Location: Newcastle - Australia
Thank you for registering your game
PostPosted: Mon, 13. Sep 10, 19:41    Post subject: insert <Value> into array <Var/Array> at index <Var/Number> Reply with quote Print

insert <Value> into array <Var/Array> at index <Var/Number>


<Value> = The value to be inserted into the target array.
<Var/Array> = The array the new value is to be inserted into.
<Var/Number> = The index number (element) that the new value is to be inserted at.


Inserts the specified value into the specified array.
The value becomes the array's new element <Var/Number>, and the old element that was at that index moves up one, ie if inserted at index 9, the original 9 would become 10 and all subsequent indexes would also move by 1.
The target array is one element larger after this instruction executes.

Note -> <Value> can be larger than one element.


Example:

$value = 5
insert $value into array $this.array at index 9

The $value would be inserted into the array $this.array at index number 9.


Command Location:



Back to top
View user's profile Send private message Send e-mail
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)

MEDALMEDALMEDAL

Joined: 02 Apr 2006
Posts: 20390 on topic

Thank you for registering your game
PostPosted: Sat, 9. Oct 10, 21:22    Post subject: [TiP][49] 286844 Reply with quote Print

insert <Value> into array <Var/Array> at index <Var/Number>


<Value> = Der Wert, der ins Ziel-Array eingegeben werden soll.
<Var/Array> = Das Array, in das der neue Wert eingegeben wird.
<Var/Number> = Die Index-Nummer (Element), an der der neue Wert eingetragen werden soll.


Fügt den angegebenen Wert in das angegebene Array ein.
Der Wert wird das neue Element <Var/Number> des Arrays. Das alte Element, dass an dieser Stelle war, bewegt sich um eins nach oben. Wenn bspw. etwas an der Stelle 9 eingegeben wird, wird die ursprüngliche 9 zur 10 werden und alle folgenden Elemente sich ebenfalls um 1 verschieben.
Das Ziel-Array ist nach der Ausführung dieses Befehls um ein Element größer als vorher.

Beachte -> <Value> kann größer als ein Element sein.


Beispiel:

$value = 5
insert $value into array $this.array at index 9

Der Wert $value wird in das Array $this.array an der Stelle 9 eingetragen.


Zu finden unter:



Back to top
View user's profile Send private message Visit poster's website
Juggernaut93



MEDAL

Joined: 17 Jul 2011
Posts: 2297 on topic
Location: DeVries/Verità Accecante/Corona Ardente
Thank you for registering your game
PostPosted: Wed, 31. Jul 13, 11:31    Post subject: [39]286844 Reply with quote Print

insert <Value> into array <Var/Array> at index <Var/Number>

<Value> = Il valore da inserire nell'array di destinazione.
<Var/Array> = L'array in cui inserire il nuovo valore.
<Var/Number> = L'indice (l'elemento) nel quale il nuovo valore deve essere inserito.

Inserisce il valore specificato nell'array specificato.
Il valore diventa il nuovo elemento <Var/Number> dell'array, e il vecchio elemento che si trovava a quell'indice si sposta di una posizione; cioè, se il nuovo valore viene inserito all'indice 9, il precedente elemento 9 diventerà il 10 e tutti gli indici successivi verranno spostati di 1.
L'array di destinazione è più grande di un elemento dopo l'esecuzione di questa istruzione.

Nota -> <Value> può essere più di un elemento.


Esempio

$value = 5
insert $value into array $this.array at index 9

$value viene inserito nell'array $this.array all'indice numero 9.


Posizione dell'istruzione nella lista:



Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic This topic is locked: you cannot edit posts or make replies.
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Control Panel
Login Data
The time now is Mon, 20. Nov 17, 06:00

All times are GMT + 2 Hours


Board Security

Copyright © EGOSOFT 1989-2017
Powered by phpBB © 2001, 2005 phpBB Group
Template created by Avatar & BurnIt!
Debug: page generation = 0.28393 seconds, sql queries = 17