![]() |
Re: Byte-Wert in 8 Bool-Variablen anzeigen - wie am einfachs
Delphi-Quellcode:
type TBooleanDynArray = array of Boolean;
|
Re: Byte-Wert in 8 Bool-Variablen anzeigen - wie am einfachs
Zitat:
|
Re: Byte-Wert in 8 Bool-Variablen anzeigen - wie am einfachs
Delphi-Quellcode:
Gruß Hagen
type
TBooleanArray = array[0..7] of Boolean; function ByteToBooleanArray(Value: Byte): TBooleanArray; var I: Integer; begin for I := Low(Result) to High(Result) do begin Result[I] := Odd(Value); Value := Value shr 1; end; end; |
Re: Byte-Wert in 8 Bool-Variablen anzeigen - wie am einfachs
Schau dir auch mal TBits aus der Classes-Unit an!
|
Re: Byte-Wert in 8 Bool-Variablen anzeigen - wie am einfachs
Die JCL enthaelt in JclLogic.pas BitsToBooleans und BooleansToBits.
![]() |
Alle Zeitangaben in WEZ +1. Es ist jetzt 12:42 Uhr. |
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 by Thomas Breitkreuz