Einzelnen Beitrag anzeigen

Kas Ob.

Registriert seit: 3. Sep 2023
346 Beiträge
 
#4

AW: If ...and... and... and... then

  Alt 19. Mai 2024, 11:19
Hi,

I may not fully understand the question right, but have you tried this approach
Code:
var
  SettingsInt: Integer;
begin
  SettingsInt := Ord(cb_rabatt.Checked) + Ord(cb_StockOn.Checked) shl 1 + Ord(cb_provision.Checked) shl 2 + Ord(cb_Serials.Checked) shl 3;
every combination will result in different value in the range [0..15].

Also you can switch to enums with a set to enhance handling and it is better readable from the enum names.
Kas
  Mit Zitat antworten Zitat