PIXEL_BIT_COUNT(n) ((n) shl 16)
PIXEL_BIT_COUNT(n) ((n) shl 16)
const
PixelType_Mono8 = PIXEL_MONO or PIXEL_BIT_COUNT(8) or $0001
Could you tell me how to define PIXEL_BIT_COUNT ?
const
PixelType_Mono8 = PIXEL_MONO or PIXEL_BIT_COUNT(8) or $0001
Could you tell me how to define PIXEL_BIT_COUNT ?
Lars Fosdal Of course not. I had not seen that use case...
ReplyDeleteIn theory, it could be possible - we are after all just initializing a value.
ReplyDeleteUsing an inline function is the best here.
ReplyDeleteBut if you want precalculated arrays, as cache for cpu intense work: (shl is not)
var
foo : array[0..10] of Integer;
initialize
for i := Low(foo) to High(foo) do foo[i] := i shl 16;
// also possible on const with some compiler flag.