Am 06.07.2011, 16:15 Uhr, schrieb teo <teo.ubu...@yahoo.com>:

What is the best way to translate following to D?

#define MAKELONG(a, b) \
    ((LONG) (((WORD) (a)) | ((DWORD) ((WORD) (b))) << 16))

The point is I would like to be able to use that at compile-time. The
macro is supposed to define some constants.

Just turn it into a function.
If you assign it to an enum or use it as an initializer for global immutables it should be evaluated at compile-time.

Reply via email to