Autor Beitrag
bms
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 735

Win XP
Delphi 3, Delphi 6 PE, Delphi 2005 PE
BeitragVerfasst: Di 20.07.04 17:32 
Viele Anfänger kommen mit den IF Schleifen nicht klar. Auf dieser Seite hat sich ein kluger Mensch des Themas der IF Schleifen angenommen. Ich meine die Seite klärt alle Fragen, auch die der Anfänger.

IF Schleifen - Tutorial (www.if-schleife.de)

Vielleicht sollte man das als FAQ-Tip im Forum hinzufügen.

_________________
VORSICHT: Ich behersche seit heute die Fünf-Finger-Handflächen-Herz-Explodier-Schlag-Kampf-Technik >:(
Raphael O.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1596


VS 2013
BeitragVerfasst: Di 20.07.04 17:48 
*lol* :mrgreen:
dachte mir schon: *was sind if-schleifen?*
aber gekoppelt mit goto's könnte man sogar was bauen, was man if-schleife nennen könnte ;-)
obbschtkuche
Gast
Erhaltene Danke: 1



BeitragVerfasst: Di 20.07.04 18:49 
Super, jetzt muss ich nur noch herausfinden wie das mit den case-Schleifen funktioniert... :gruebel:

//Edit:

@Fiji-Fighter: Hier ein Tutorial zu Verwendung des Apo'strophs: :P :mrgreen:

www.apostroph.de/
Phobeus
ontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 1280

Linux (FC6), WinXP Pro (Box)
D6 Pers, D7 Pro, FPC 2.x
BeitragVerfasst: Di 20.07.04 21:14 
hrhrhr... na endlich mal jemand der sich dem Problem angemessen widmet :)

_________________
"Menschen sterben nicht wenn man sie zu Grabe trägt, sondern wenn sie ihre Träume verlieren..."
Raphael O.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1596


VS 2013
BeitragVerfasst: Di 20.07.04 21:34 
obbschtkuche hat folgendes geschrieben:
@Fiji-Fighter: Hier ein Tutorial zu Verwendung des Apo'strophs:

es sollte nur klarwerden, dass das "goto" ein einzelner Begriff / BEfehl ist und das da kein Apostroph hinkommt weiß ich...
abgesehen davon würde ich die unter normalen umständen hier auch nie benutzen, außer es handelt sich eben um eine Abtrennung'eines'BEgriffs...
abgesehen davon, ist das ja in Foren eh so eine Sache mit der Rechtschreibung :P :D
aber war ja net böse gemeint von dir ;) (nicht das das wie ne "Abmahnung" rüberkommt ' ' ''' '''
''' '' '' ' ' '' ''
;)
maxk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1696
Erhaltene Danke: 1

Win XP, Debian Lenny
Delphi 6 Personal
BeitragVerfasst: Di 20.07.04 21:43 
ausblenden Delphi-Quelltext
1:
2:
3:
repeat
 if Application.Terminated then break;
until False;
Das ist eindeutig ne IF-Schleife user defined image

_________________
Ein Computer wird das tun, was Du programmierst - nicht das, was Du willst.
obbschtkuche
Gast
Erhaltene Danke: 1



BeitragVerfasst: Di 20.07.04 21:47 
Quatsch, sieht doch jeder dass das ne Endlos-Abfrage ist :roll:
bms Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 735

Win XP
Delphi 3, Delphi 6 PE, Delphi 2005 PE
BeitragVerfasst: Di 20.07.04 23:42 
maxk hat folgendes geschrieben:
ausblenden Delphi-Quelltext
1:
2:
3:
repeat
 if Application.Terminated then break;
until False;
Das ist eindeutig ne IF-Schleife user defined image


Was soll das werden? Wenn das Programm beendet wird, dann wird auch die Prozedur beendet. Ja, das ergibt einen Sinn. :gruebel:

_________________
VORSICHT: Ich behersche seit heute die Fünf-Finger-Handflächen-Herz-Explodier-Schlag-Kampf-Technik >:(
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: Mi 21.07.04 03:01 
Wenn, dann bitte schon KONSEQUENT durchziehen!

ausblenden Delphi-Quelltext
1:
While True do;					


@Case-Schleifen:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
Procedure CaseSchleife;
label
    AA;
var
    A:Integer;
begin
    A := 0;
AA:
    Case A of
        0: Begin Inc(a); Goto AA; end;
        1: Begin Dec(a); Goto AA; end;
    else
        System.Crash;
    end;
end;


Obwohl das Komboniert mit If-Schleifen whol auch gut kommt:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
Procedure IfIt'sTheCaséSchleife';
label
    AA;
    BB;
var
    A:Integer;
begin
    A := 0;
AA:
    Case A of
        0: Begin Inc(a); Goto AA; end;
        1: Begin Dec(a); Goto AA; end;
        2: Begin
BB:
            IF A <> 0 Then Goto BB;
           end;
    else
        System.Crash;
    end;
end;

_________________
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.
maxk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1696
Erhaltene Danke: 1

Win XP, Debian Lenny
Delphi 6 Personal
BeitragVerfasst: Mi 21.07.04 06:57 
bms hat folgendes geschrieben:
maxk hat folgendes geschrieben:
ausblenden Delphi-Quelltext
1:
2:
3:
repeat
 if Application.Terminated then break;
until False;
Das ist eindeutig ne IF-Schleife user defined image


Was soll das werden? Wenn das Programm beendet wird, dann wird auch die Prozedur beendet. Ja, das ergibt einen Sinn. :gruebel:
Mir ist auf Anhieb kein besserer Bool eingefallen :lol:

_________________
Ein Computer wird das tun, was Du programmierst - nicht das, was Du willst.
blackbirdXXX

ontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 1077
Erhaltene Danke: 1

Ubuntu Dapper

BeitragVerfasst: Mi 21.07.04 19:19 
Das ist eine IF-Endlos-Schleife
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
label nochmal
var zustand: Boolean

norchmal:                           //If Schleife Anfang
if not zustand then goto nochmal    //If Schleife Ende
else application.terminate;         //Der einzig wahre Weg ein Programm zu beenden.


Das ist eine IF-Schleife
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
label nochmal
var durchgang: Integer;

norchmal:                           //If Schleife Anfang
if durchgang < 1000 then 
 begin
  durchgang = durchgang + 1         //So inkremiert (schreibt man das so? gibt es das Wort überhaupt? man
  goto nochmal                      //schreiben wir lieber so "inct man".
 end;                               //If Schleife Ende
else application.terminate;         //Der einzig wahre Weg ein Programm zu beenden.

_________________
Klein, schwarz und ärgert Techniker? Jumper!
bms Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 735

Win XP
Delphi 3, Delphi 6 PE, Delphi 2005 PE
BeitragVerfasst: Do 22.07.04 20:30 
Hej Leute, nun mal langsam. Eigentlich war das eine verar**e. Es gibt keine IF Schleifen. Das sagt die Seite. Es gibt nur IF Abfragen. Und auch wenn man damit eine Schleife zustandebring, so ist es immer noch eine Abfrage. Also kommt hier nicht mit IF Schleifen, sonnst macht Ihr euch :rofl:

_________________
VORSICHT: Ich behersche seit heute die Fünf-Finger-Handflächen-Herz-Explodier-Schlag-Kampf-Technik >:(
maxk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1696
Erhaltene Danke: 1

Win XP, Debian Lenny
Delphi 6 Personal
BeitragVerfasst: Do 22.07.04 22:00 
Wie teuer ist eigentlich eine Domain wei www.if-schleife.de?

_________________
Ein Computer wird das tun, was Du programmierst - nicht das, was Du willst.
bms Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 735

Win XP
Delphi 3, Delphi 6 PE, Delphi 2005 PE
BeitragVerfasst: Do 22.07.04 22:17 
Hängt davon ab. Wenn er bereits Kunde ist und bei dem Provider eine weitere Domain bestellt, dann kostet ihn das wahrscheinlich 99Ct pro Monat.

_________________
VORSICHT: Ich behersche seit heute die Fünf-Finger-Handflächen-Herz-Explodier-Schlag-Kampf-Technik >:(
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: So 28.01.07 17:31 
Da das Thema leider immer noch sehr brandaktuell ist, hab ich mich mal entschlossen, dieses Konstrukt in der Wikipedia entsprechend zu würdigen: Suche in Wikipedia IF-SCHLEIFE Würde mich über ein paar Ergänzungen im Artikel von eurer Seite freuen ;-)

_________________
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.
Roadrunner116
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 89

Win XP Home, Ubuntu Linux 6.06
Delphi 7, Java, PHP
BeitragVerfasst: So 28.01.07 17:56 
Moin,

hab dienen link aufgerufen:

"Es wurden keine passenden Seiten gefunden."

irgendwas ist da schief gelaufen....

Gruß Roadrunner116
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: So 28.01.07 18:14 
Dann nimm den direkten Link auf den Artikel: de.wikipedia.org/wiki/If-Schleife ... Der geht :P

Und es gibt sie doch NICHT! :mahn:

_________________
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.
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: So 28.01.07 18:19 
Zitat:
Dieser Artikel wurde zur Löschung vorgeschlagen.

:mrgreen: (Ich wars nicht :-P)


EDIT: Nach SofortLöschAntrag (SLA) mit Begründung
Zitat:
Unfug, Theoriefindung unter "Herkunft", keine Relevanz laut "Bedeutung"

und Diskussionskommentar
Zitat:
Jetzt mal ehrlich. Braucht man einen Wikipedia Artikel über die "If-Schleife"? Meinetwegen ein Kommentar auf der [Schleife (Programmierung)]-Seite, aber ein eigener Artikel? Das ist übertrieben

wurde der Artikel gelöscht xD.

_________________
"Wer Ego-Shooter Killerspiele nennt, muss konsequenterweise jeden Horrorstreifen als Killerfilm bezeichnen." (Zeit.de)
Roadrunner116
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 89

Win XP Home, Ubuntu Linux 6.06
Delphi 7, Java, PHP
BeitragVerfasst: So 28.01.07 19:48 
Zitat:

Und es gibt sie doch NICHT! :mahn:

kla aber ich war dann doch neugierig!!!

Zitat:
Unfug, Theoriefindung unter "Herkunft", keine Relevanz laut "Bedeutung"

Mient ihr man kann die bei Wiki irgendwie bestechen, dass die es drin lassen?! :gruebel:
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: So 28.01.07 20:46 
Ich glaub, man müsste dazu lediglich ein wenig mehr Informationen finden:
- erstes Auftauchen ...
- Warum gibt's das nicht
- Überarbeitung der Bedeutung ;-)

Wenn man sich aber sonst so anguckt, wie da eine Löschung "diskutiert" wird, wundert mich echt nix mehr ... Zu dem Kommentar nur soviel: Der scheint keine Ahnung zu haben ... Denn die Relevanz ist laut Google doch nicht gerade unerheblich ;-) Und Theorie-Findung zwecks Anfängerfehler ... Der Typ hat wahrscheinlich noch nie Programmiert ;-)

_________________
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.