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:
| procedure TForm1.B_AntwortClick(Sender: TObject); var gewicht , groese , ideal : real; begin
if RG_sex.itemindex = 0 then begin gewicht := strtofloat (E_gewicht.text); groese := strtofloat (E_groese.text); ideal := (groese - 100 - ((groese - 100) * 0.95) ) end
else begin gewicht := strtofloat (E_gewicht.text); groese := strtofloat (E_groese.text); ideal := (groese - 100 - ((groese - 100) * 0.90) ) end end;
if ideal = groese then begin showmessage := 'sie haben idealgewicht' end
else if ideal < groese then begin showmessage := 'sie haben untergewicht' end else begin showmessage := 'sie haben übergewicht' end |
so das habe ich mir mal "ausgedacht"...aber da kommen ein paar fehlermeldungen ^^
und zwar folgende ...
[Hint] Unit1.pas(5

: Value assigned to 'ideal' never used
[Hint] Unit1.pas(57): Value assigned to 'groese' never used
[Hint] Unit1.pas(56): Value assigned to 'gewicht' never used
[Hint] Unit1.pas(65): Value assigned to 'ideal' never used
[Hint] Unit1.pas(64): Value assigned to 'groese' never used
[Hint] Unit1.pas(63): Value assigned to 'gewicht' never used
[Error] Unit1.pas(69): Declaration expected but 'IF' found
[Error] Unit1.pas(71): Not enough actual parameters
[Error] Unit1.pas(72): Statement expected, but expression of type 'String' found
[Error] Unit1.pas(74): '.' expected but 'ELSE' found
[Error] Unit1.pas(76): Identifier redeclared: 'Finalization'
[Error] Unit1.pas(77): Not enough actual parameters
[Error] Unit1.pas(7

: Statement expected, but expression of type 'String' found
[Warning] Unit1.pas(79): Text after final 'END.' - ignored by compiler
[Fatal Error] Project1.dpr(5): Could not compile used unit 'Unit1.pas'
was mach ich falsch?? ( geht das überhaupt was ich da geschrieben hab xD )