Hallo,
komme ganz gut mit c/cpp zurecht, da lassen sich aber Fensterchen schwer generieren. Delphi ist da einfach intuitiv, jedoch hab ich es mit der Syntax noch nicht so verstanden.
Fehler:
[Error] Unit1.pas(540): Constant expression expected
[Error] Unit1.pas(551): Constant expression expected
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:
| const TP_ERROR = 1; const TP_OK = 2; const TP_BR_INVALID = 0; const TP_BR_NULL = 1; const TP_BR_LOW = 2; const TP_BR_GOOD = 3; const TP_BR_HIGH = 4;
function TMain.GetState(n:integer):integer; var st_code, br :integer; begin case (ar_tppoints[1][n].cmd_color) of clBlue: for br := 1 to ar_tppoints[1][n].branches do begin if br = 1 then st_code := GetStateCode(ar_tppoints[1][n].val_branch[br]) else st_code := st_code and GetStateCode(ar_tppoints[1][n].val_branch[br]); end; if (st_code = TP_BR_NULL) then Result := TP_OK else Result := TP_ERROR; clRed: for br := 1 to ar_tppoints[1][n].branches do begin if br = 1 then st_code := GetStateCode(ar_tppoints[1][n].val_branch[br]) else st_code := st_code and GetStateCode(ar_tppoints[1][n].val_branch[br]); end; if (st_code = TP_BR_GOOD) then Result := TP_OK else Result := TP_ERROR; else Result := TP_ERROR; end; end; |
Ich versteh einfach nicht was er von mir will?! Kann mir da jemand bitte weiterhelfen. Danke im voraus
Gruss in die weite Welt!