translate a macro to D

teo teo.ubuntu at yahoo.com
Wed Jul 6 07:15:34 PDT 2011


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.


More information about the Digitalmars-d-learn mailing list