Autor Beitrag
Hansi@OMG
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 304

Vista
Delphi 2006 Prof., Lazarus
BeitragVerfasst: Mo 14.11.05 17:12 
Ich habe folgenden Code:
ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
procedure TForm1.Button9Click(Sender: TObject);
var t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,mig : real;
i:integer;
begin
tablerot.Refresh;
//Parameter berechnen
 t6:=0;
 t7:=0;
 t8:=0;
 t9:=0;
 t10:=0;
 t11:=0;
 t12:=0;
 t13:=0;
 t14:=0;
 t15:=0;
 mig:=0;

  tablerot.First;
  for i:=0 to tablerot.RecordCount-1 do begin
   if tablerot.Fields.Fields[6].AsString <> 'Deutsch' then mig:=mig+1;
   if tablerot.Fields.Fields[5].AsString = '6' then t6:=t6+1;
   if tablerot.Fields.Fields[5].AsString = '7' then t7:=t7+1;
   if tablerot.Fields.Fields[5].AsString = '8' then t8:=t8+1;
   if tablerot.Fields.Fields[5].AsString = '9' then t9:=t9+1;
   if tablerot.Fields.Fields[5].AsString = '10' then t10:=t10+1;
   if tablerot.Fields.Fields[5].AsString = '11' then t11:=t11+1;
   if tablerot.Fields.Fields[5].AsString = '12' then t12:=t12+1;
   if tablerot.Fields.Fields[5].AsString = '13' then t13:=t13+1;
   if tablerot.Fields.Fields[5].AsString = '14' then t14:=t14+1;
   if tablerot.Fields.Fields[5].AsString = '15' then t15:=t15+1;
   tablerot.Next;
end;

 t6:=(t6 / tablerot.RecordCount)*100;
 t7:=(t7 / tablerot.RecordCount)*100;
 t8:=(t8 / tablerot.RecordCount)*100;
 t9:=(t9 / tablerot.RecordCount)*100;
 t10:=(t10 / tablerot.RecordCount)*100;
 t11:=(t11 / tablerot.RecordCount)*100;
 t12:=(t12 / tablerot.RecordCount)*100;
 t13:=(t13 / tablerot.RecordCount)*100;  //Hier
 t14:=(t14 / tablerot.RecordCount)*100;
 t15:=(t15 / tablerot.RecordCount)*100;


In der Zeile //Hier meldet Delphi folgenden Fehler: [Fehler] Unit1.pas(378): Anweisung erforderlich, aber Ausdruck vom Typ 'TABSTable' gefunden

keine Ahnung, was der Schmarn soll, bitte Hilfe!

_________________
Who doesn't know the Micrsoft developer "Mahatma Fatal Error"?
Robert.Wachtel
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 895
Erhaltene Danke: 7

Windows 7 Ultimate x64
D5 Ent, D7 Arch, RAD Studio 2010 Pro, VS 2008
BeitragVerfasst: Mo 14.11.05 17:34 
Schwirrt irgendwo auf der Form eine t13 benamste TTable rum?
JayK
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1013



BeitragVerfasst: Mo 14.11.05 17:42 
Würde ich auch gerne wissen :gruebel:

aber noch zwei andere Hinweise:
* Real benutzt man nicht mehr, nimm stattdessen Double oder Extended
* Die Klammern um txx / tablerot.RecordCount sind unnötig ;)