Autor Beitrag
mexx
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1183



BeitragVerfasst: Fr 30.12.05 08:56 
Ich habe folgende Case-Anweisung und möchte aber bei erfüllter Bedingung, zwei Variablen geändert bekommen. Aber so, wie ich imr das dachte funktioniert das nicht. Wie wäre es denn richtig?

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
    case I of
     2: KNummer := IntToStr(QueryMitarbeiterKarten_Nummer.Value); //Gesamtzeiten des Mitarbeiters
     1: FehlerWert := 'T';
        KNummer := IntToStr(QueryMitarbeiterKarten_Nummer.Value);//Einzelfehlzeiten des Mitarbeiters
     4: KNUmmer := '';
        FehlerWert := 'T';//GesamtF aller Mitarbeiter
     5: Zeitart := '';
        FehlerWert := 'T';//GesamtF aller Angestellten
     6: Zeitart := '';
        FehlerWert := 'T';//GesamtF aller Arbeiter
    end;
stifflersmom
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 194

XP /XP PRO/ SuSE div.
D1 - D7, BDS 2006
BeitragVerfasst: Fr 30.12.05 08:59 
Schon mal was von Begin / End gehört :-)

Die kann man auch in einer Case Anweisung benutzen

Also
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
Case Wert of
1 : Begin
    Ganz viele schlaue sachen;
    End;
2 : Eine Schlaue Sache;
End;

Moin
Der Jan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 98

Win2k prof, WinXP prof, Linux
D6 Prof, BCB4 Std, BCB6 Ent, BDS 2006 Ent
BeitragVerfasst: Fr 30.12.05 09:00 
In dem du die Anweisungen im Case-Zweig in begin und end einschließt??

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
case I of  
     2: KNummer := IntToStr(QueryMitarbeiterKarten_Nummer.Value); //Gesamtzeiten des Mitarbeiters  
     1: begin
          FehlerWert := 'T';  
          KNummer := IntToStr(QueryMitarbeiterKarten_Nummer.Value);//Einzelfehlzeiten des Mitarbeiters  
        end;
//...
end;

_________________
Gruß, Jan


Zuletzt bearbeitet von Der Jan am Fr 30.12.05 09:02, insgesamt 1-mal bearbeitet
mexx Threadstarter
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1183



BeitragVerfasst: Fr 30.12.05 09:01 
Bin ich deppert, is ja logisch! THX :autsch:
Der Jan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 98

Win2k prof, WinXP prof, Linux
D6 Prof, BCB4 Std, BCB6 Ent, BDS 2006 Ent
BeitragVerfasst: Fr 30.12.05 09:03 
Huh... Synchron-Posting :lol:

_________________
Gruß, Jan