Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Object-Pascal / Delphi-Language (https://www.delphipraxis.net/32-object-pascal-delphi-language/)
-   -   Brauche Hilfe bei Delphi 6 doppeltes case-Label (https://www.delphipraxis.net/187833-brauche-hilfe-bei-delphi-6-doppeltes-case-label.html)

Dejan Vu 7. Jan 2016 18:40

AW: Brauche Hilfe bei Delphi 6 doppeltes case-Label
 
Blöd, wenn B mal >9 wird.

Sir Rufo 7. Jan 2016 19:14

AW: Brauche Hilfe bei Delphi 6 doppeltes case-Label
 
So etwas kann man mit einem Array lösen
Delphi-Quellcode:
var
  PreisLookup: array[0..9,0..9] of double;

Result := PreisLookup[a,b];
oder (im Advanced Mode) mit einem Dictionary. Dort trägt man dann nur die erlaubten Kompinationen mit dem entsprechenden Preis ein.


Alle Zeitangaben in WEZ +1. Es ist jetzt 04:45 Uhr.
Seite 2 von 2     12   

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz