Next Previous Up Top Contents Index

2 The Functional Developer Win32 API Libraries

2.9 Combining bit mask constants

Where C code would use the | operator to combine bit mask constants, Dylan code usually uses the logior function. However, a few such constants have values of type <machine-word> when they will not fit in a small integer, and logior only works on instances of <integer>. Because of this, the win32-common library exports a %logior function which is used like logior except that it accepts values of either type <integer> or <machine-word> and returns a <machine-word> result. It can be used in most places that accept a bit mask (C types DWORD, ULONG, LPARAM, and so on), but must be used if any of the arguments are a <machine-word>. The contexts where this is likely to occur are:


C FFI and Win 32 Reference - 31 MAR 2000

Next Previous Up Top Contents Index