Autor Beitrag
simlei
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 23

WIN XP
D7
BeitragVerfasst: Fr 03.08.07 12:01 
a := Copy(a, 5, 5) + Copy(a, 6, 5);
a ist ein Array

wie muss ich das schreiben? so gehts nicht...
thanks in advance :)

Die Zeit, die du damit verbracht hast, die Richtlinie rauszukramen, wäre sicher besser genutzt mit der Beantwortung der Frage...


Zuletzt bearbeitet von simlei am Fr 03.08.07 12:07, insgesamt 2-mal bearbeitet
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5284
Erhaltene Danke: 27

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Fr 03.08.07 12:07 
hi,
Was für ein Array ist a und was hast du genau vor ?
simlei Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 23

WIN XP
D7
BeitragVerfasst: Fr 03.08.07 12:10 
a ist ein array of INT, obwohl das bei copy ja keine rolle spielen sollte

Ich möchte einfach zwei Teilbereiche des Arrays nehmen, welche dann dieses Array ersetztenm sollen. Das Beispiel oben ist vielleicht schlecht, ein anderes:

a := Copy(a, 0, 2) + Copy(a, 5, 2);

Damit will ich, dass a am Ende nur noch sein vorheriges 0., 1., 5. und 6. Element enthält.
€: natürlich frage ich weil diese Beispiel oben NICHT funktioniert und ich gerne wissen würde wie man es anders macht.
noidic
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 851

Win 2000 Win XP Vista
D7 Ent, SharpDevelop 2.2
BeitragVerfasst: Fr 03.08.07 12:38 
Soweit ich mich erinnere ist + für Arrays nicht definiert.

Ich wüsste jetzt auch keine bessere Möglichkeit, als die Elemente einzeln in ein neues Array zu kopieren.

_________________
Bravery calls my name in the sound of the wind in the night...
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10183
Erhaltene Danke: 1256

W10ent
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Fr 03.08.07 12:52 
Moin!

user profile iconnoidic hat folgendes geschrieben:
Ich wüsste jetzt auch keine bessere Möglichkeit, als die Elemente einzeln in ein neues Array zu kopieren.

(Ich unterstelle ein dyn. Array): Kopiere die Elemente oberhalb des Splitpoints nach "unten" (also an den Splitpoint) und mach dann das Array "kleiner". :idea: ;)

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Fr 03.08.07 16:40 
IIRC gibt's dafür die Funktion Concat.

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
Reinhard Kern
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 591
Erhaltene Danke: 14



BeitragVerfasst: Fr 03.08.07 18:05 
user profile iconsimlei hat folgendes geschrieben:
a := Copy(a, 5, 5) + Copy(a, 6, 5);
a ist ein Array

wie muss ich das schreiben? so gehts nicht...
thanks in advance :)

Die Zeit, die du damit verbracht hast, die Richtlinie rauszukramen, wäre sicher besser genutzt mit der Beantwortung der Frage...


zukkunftssichere Komplettlösung: du programmierst dir eine Array-Klasse (array ist ja keine) mit Methoden zum Kopieren, Füllen, Verschieben usw. von Spalten und Zeilen. Und für die interessierte Allgemeinheit noch Determinate, Inversion...

Gruss Reinhard