Link to home
Start Free TrialLog in
Avatar of Antrix
Antrix

asked on

Delphi: bytes/bits

Hello, from my knowledge the lowest variable type in delphi is a byte (8 bits), but I am filling out a record to be used with the winsock api and two of the fields it requires has to be 4 bits long.

I am wondering how i could achieve this in delphi, in C it is quite easily done like this:

unsigned char firstfield:4, secondfield:4;

Basically, need a way to work with nibbles (4 bits) in delphi.

Antrix
ASKER CERTIFIED SOLUTION
Avatar of grg99
grg99

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Antrix
Antrix

ASKER

Thank you for your quick and accurate reply