Autor Beitrag
gamer94
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 41

Win7 HP, WinXP
Delphi 7 Pers.
BeitragVerfasst: Di 12.08.08 20:27 
Hallo ich versuche vergebens ein Array zu rotieren shl und shr löschen ja immer einen Teil.
Mit rotieren meine ich:

Vorher:
1 2 3 4 5 6 7 8 9 10 11 12

Nachher:
2 3 4 5 6 7 8 9 10 11 12 1

Kann mir vielleicht noch jemand helfen?


Zuletzt bearbeitet von gamer94 am Mi 13.08.08 20:47, insgesamt 1-mal bearbeitet
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10183
Erhaltene Danke: 1256

W10ent
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Di 12.08.08 20:56 
Moin!

user profile icongamer94 hat folgendes geschrieben:
Hallo ich versuche vergebens ein Array zu rotieren shl und shr löschen ja immer einen Teil.
Mit rotieren meine ich:

Vorher:
2 3 4 5 6 7 8 9 10 11 12 1

Nachher:
2 3 4 5 6 7 8 9 10 11 12 1

Kann mir vielleicht noch jemand helfen?
Ausnahmsweise mal direkt Code: ;)
ausblenden Delphi-Quelltext
1:
2:
3:
procedure RotateArrayForGamer94;
begin
end;

cu :lol:
Narses

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

Win 7
TurboDelphi, Visual Studio 2010
BeitragVerfasst: Di 12.08.08 20:59 
Arrays rotieren:

1. erstes Element merken
2.1 Array vom ersten Element bis zum vorletzten durchgehen
2.2 Jedes Element gleich dem nächsten setzen
3. Letztes Element gleich dem gemerktem setzen
Dunkel
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 682

Mac OS X Snow Leopard
Xcode 3.1
BeitragVerfasst: Di 12.08.08 21:02 
user profile iconNarses hat folgendes geschrieben:
{ diverses Geschreibsel }

Danke! Du hast mir den Abend gerettet und mir Tipparbeit erspart. :lol:

_________________
Ich streite einsam mich mit dieser Oberflächenwelt
Gutes sei ein löblich Brot von dem ich zehre - bis zum Tod [Das Ich - Im Ich]
Jerk
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 251

Vista Ultimate, Ubuntu
Turbo Delphi 2006
BeitragVerfasst: Di 12.08.08 22:08 
Pff bloß weil ihr nicht wisst wie man ein Array um 360 Grad rotiert...
der organist
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 467
Erhaltene Danke: 17

WIN 7
NQC, Basic, Delphi 2010
BeitragVerfasst: Mi 13.08.08 15:12 
dann erklär es uns doch...

_________________
»Gedanken sind mächtiger als Waffen. Wir erlauben es unseren Bürgern nicht, Waffen zu führen - warum sollten wir es ihnen erlauben, selbständig zu denken?« Josef Stalin
Timosch
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1314

Debian Squeeze, Win 7 Prof.
D7 Pers
BeitragVerfasst: Mi 13.08.08 15:24 
user profile iconNarses hat folgendes geschrieben:
Moin!

user profile icongamer94 hat folgendes geschrieben:
Hallo ich versuche vergebens ein Array zu rotieren shl und shr löschen ja immer einen Teil.
Mit rotieren meine ich:

Vorher:
2 3 4 5 6 7 8 9 10 11 12 1

Nachher:
2 3 4 5 6 7 8 9 10 11 12 1

Kann mir vielleicht noch jemand helfen?
Ausnahmsweise mal direkt Code: ;)
ausblenden Delphi-Quelltext
1:
2:
3:
procedure RotateArrayForGamer94;
begin
end;

cu :lol:
Narses

Das ist viel zu ineffizient. Und sowas von dir! Man macht das so:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure RotateArrayForGamer94; assembler;
asm
nop
end;

:mrgreen:

_________________
If liberty means anything at all, it means the right to tell people what they do not want to hear. - George Orwell
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10183
Erhaltene Danke: 1256

W10ent
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mi 13.08.08 15:54 
Moin!

Ich hab zwar mit dem Spaß angefangen :angel: aber ich denke, jetzt ist auch genug, OK?

Und jetzt wieder zurück zum "wirklichen" Thema! :)

cu
Narses

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

win xp, (win vista), win 7
VS 2008 Express Edition, VS 2010 Express Edition, VS 2010 Professionell
BeitragVerfasst: Mi 13.08.08 16:01 
Dies thema hat kein thema :mrgreen: zumindest kein zweifelsfrei erkennbares
nagel
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 708

Win7, Ubuntu 10.10

BeitragVerfasst: Mi 13.08.08 16:29 
Doch, aber das wurde eigentlich auch schon beantwortet.
gamer94 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 41

Win7 HP, WinXP
Delphi 7 Pers.
BeitragVerfasst: Mi 13.08.08 19:46 
Ok, ich hab´s danke an Jann1k, so wie er es vorgeschlagen hat, hat´s einwandfrei funktioniert.

Zu den anderen sag ich nichts, außer, dass ich nicht besonders begeistert war… :roll:
Naja, wenn ihr meint ihr müsst die Hilfesuchenden verjagen, dann ist das eure Sache.
Dunkel
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 682

Mac OS X Snow Leopard
Xcode 3.1
BeitragVerfasst: Mi 13.08.08 20:07 
user profile icongamer94 hat folgendes geschrieben:
Zu den anderen sag ich nichts, außer, dass ich nicht besonders begeistert war… :roll:
Naja, wenn ihr meint ihr müsst die Hilfesuchenden verjagen, dann ist das eure Sache.

Schau Dir nochmal Dein Vorher-Nacher Beispiel an, dann weißt Du, weshalb hier ein paar nicht wirklich zum Thema passende Beiträge gepostet worden sind.

Niemand will Dich hier verjagen (behaupte ich jetzt einfach mal), und ein wenig Spaß gehört doch auch zum Programmieren, oder? :beer:

_________________
Ich streite einsam mich mit dieser Oberflächenwelt
Gutes sei ein löblich Brot von dem ich zehre - bis zum Tod [Das Ich - Im Ich]
gamer94 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 41

Win7 HP, WinXP
Delphi 7 Pers.
BeitragVerfasst: Mi 13.08.08 20:52 
Aber niemand kommt hier anscheinend auch die Idee zu sagen sagen: "He, dein Beispiel ist glaub ich nicht ganz richtig". Lieber den Autor im Dunkeln tappen lassen und grinsen was der für nen Mist geschrieben hat find' ich bescheiden.
Ich hab nichts dagegen wenn ihr´s lustig findet. (Ich musste auch lachen, als ich mein Beispiel noch mal unter die Lupe genommen hab) Aber dann den ganzen Thread mit sinnfreien antworten vollkleistern, ist doch wirklich nicht nötig, oder?
Hidden
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2242
Erhaltene Danke: 55

Win10
VS Code, Delphi 2010 Prof.
BeitragVerfasst: Fr 15.08.08 16:36 
Imho war das ne 'Erster-Blick-Sache'. Wenn du dich also gewundert hast, hättest du einfach einen einzigen Blick auf deinen Beitrag werfen müssen ;)

_________________
Centaur spears can block many spells, but no one tries to block if they see that the spell is a certain shade of green. For this purpose it is useful to know some green stunning hexes. (HPMoR)
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Fr 15.08.08 18:21 
Ich denke, alle Aspekte des Threads sind soweit erledigt, daher mache ich hier jetzt mal zu. ;-)

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
Dieses Thema ist gesperrt, Du kannst keine Beiträge editieren oder beantworten.

Das Thema wurde von einem Team-Mitglied geschlossen. Wenn du mit der Schließung des Themas nicht einverstanden bist, kontaktiere bitte das Team.