Code verkürzen[gelöst]
Übersicht

![]() |
maboxBetreff: Code verkürzen[gelöst] |
![]() Antworten mit Zitat ![]() |
---|---|---|
Hi hab hier folgenden Code. Kann man den irgendwie noch verkürzen? Weil so ist er so lang (viel schreibarbeit ![]() Code: [AUSKLAPPEN] graph_x = 800
Graphics graph_x,600,0,2 txt1$ = "Spiel: XXXXXXXX XXXXXXXXX" txt2$ = "Menü basierend auf: txt3$ = "XXXXXXX XXXXX by XXX "+Chr(169)+" 2006." txt4$ = "Grafik:" txt5$ = "XXXX XXXXXXX" txt6$ = "Sounds:" txt7$ = "XXXXXX XXXXXXX" txt8$ = "Musik:" txt9$ = "XX XXXXX - www.XXXXXXX.de" txt10$ = "Copyright"+Chr(169)+" 2007 by XXXXX" Text graph_x/2- StringWidth(txt1$)/2, 0,txt1$ Text graph_x/2- StringWidth(txt2$)/2, 50,txt2$ Text graph_x/2- StringWidth(txt3$)/2, 80,txt3$ Text graph_x/2- StringWidth(txt4$)/2, 130,txt4$ Text graph_x/2- StringWidth(txt5$)/2, 160,txt5$ Text graph_x/2- StringWidth(txt6$)/2, 210,txt6$ Text graph_x/2- StringWidth(txt7$)/2, 240,txt7$ Text graph_x/2- StringWidth(txt8$)/2, 290,txt8$ Text graph_x/2- StringWidth(txt9$)/2, 320,txt9$ Text graph_x/2- StringWidth(txt0$)/2, 370,txt0$ WaitKey() |
||
Fujitsu-Siemens Laptop, 2Ghz Intel Core2Duo Prozessor, 2GB Ram, 120GB Festplatte, ATI Mobility Radeon X1400, Windows Vista Ultimate
www.mausoft.de.tl Dönerfresser Homepage |
- Zuletzt bearbeitet von mabox am So, Nov 18, 2007 10:57, insgesamt einmal bearbeitet
![]() |
BladeRunnerModerator |
![]() Antworten mit Zitat ![]() |
---|---|---|
Benutze ql:dim | ||
Zu Diensten, Bürger.
Intel T2300, 2.5GB DDR 533, Mobility Radeon X1600 Win XP Home SP3 Intel T8400, 4GB DDR3, Nvidia GF9700M GTS Win 7/64 B3D BMax MaxGUI Stolzer Gewinner des BAC#48, #52 & #92 |
![]() |
SpionAtom |
![]() Antworten mit Zitat ![]() |
---|---|---|
Oder Data/Read | ||
os: Windows 10 Home cpu: Intel Core i7 6700K 4.00Ghz gpu: NVIDIA GeForce GTX 1080 |
![]() |
mabox |
![]() Antworten mit Zitat ![]() |
---|---|---|
Könnt ihr mir bitte ein Beispiel geben? Alleine bekomm ich das nicht hin. | ||
Fujitsu-Siemens Laptop, 2Ghz Intel Core2Duo Prozessor, 2GB Ram, 120GB Festplatte, ATI Mobility Radeon X1400, Windows Vista Ultimate
www.mausoft.de.tl Dönerfresser Homepage |
![]() |
The_Nici |
![]() Antworten mit Zitat ![]() |
---|---|---|
Code: [AUSKLAPPEN] Dim blubb(99) For i=0 to 99 blubb(i)=Rand(1,100) Next Füllt ein Array mit Zufallszahlen. |
||
![]() |
mabox |
![]() Antworten mit Zitat ![]() |
---|---|---|
Jo das ist mir klar aber wie kann ich den Code ganz oben in diesem Thread mit arrays verkürzen? | ||
Fujitsu-Siemens Laptop, 2Ghz Intel Core2Duo Prozessor, 2GB Ram, 120GB Festplatte, ATI Mobility Radeon X1400, Windows Vista Ultimate
www.mausoft.de.tl Dönerfresser Homepage |
![]() |
SpionAtom |
![]() Antworten mit Zitat ![]() |
---|---|---|
Code: [AUSKLAPPEN] Cls
For i = 1 To 5 Read zeile$ Center zeile$, i * 20 Next WaitKey End Function Center(t$, y) Text (GraphicsWidth() - StringWidth(t$)) / 2, y, t$ End Function Data "Beispiel-Code:" Data "Dieser Code zeigt, wie man selbigen" Data "durch die Benutzung von Schleifen" Data "und Functions deutlich verkürzen kann." Data "Sehen Sie selbst!" |
||
os: Windows 10 Home cpu: Intel Core i7 6700K 4.00Ghz gpu: NVIDIA GeForce GTX 1080 |
![]() |
mabox |
![]() Antworten mit Zitat ![]() |
---|---|---|
Genial! vielen Dank! | ||
Fujitsu-Siemens Laptop, 2Ghz Intel Core2Duo Prozessor, 2GB Ram, 120GB Festplatte, ATI Mobility Radeon X1400, Windows Vista Ultimate
www.mausoft.de.tl Dönerfresser Homepage |
Übersicht


Powered by phpBB © 2001 - 2006, phpBB Group