D - version ID enumeration
- Robert (15/15) Jan 22 2004 How about the following?
- Brad Anderson (9/29) Jan 22 2004 and this:
- Y.Tomino (15/30) Jan 23 2004 If you request the power like #if of C, I think we need version ID
How about the following? version(A, B, C) { // <- Here! version = D; } instead of version(A) { version = D; } version(B) { version = D; } version(C) { version = D; } Ditto debug.
Jan 22 2004
and this: version(A, B, C) { version = D; } else { version = E; } Ditto debug. BA Robert wrote:How about the following? version(A, B, C) { // <- Here! version = D; } instead of version(A) { version = D; } version(B) { version = D; } version(C) { version = D; } Ditto debug.
Jan 22 2004
If you request the power like #if of C, I think we need version ID "expression". For example, "windows.h" has this line: #if !defined(_68K_) && !defined(_MPPC_) && !defined(_X86_) && !defined(_IA64_) && !defined(_AMD64_) && defined(_M_IX86) version(!_68K_ && !_MPPC_ && !_X86_ && !_IA64_ && !_AMD64_ && _M_IX86) { "&&" "||" "!", and, version numbers are necessary every ID. #if defined(_WIN32_WINNT) && (WINVER < 0x0400) && (_WIN32_WINNT > 0x0400) version WINVER = 0x0501; version _WIN32_WINNT = 0x501; version(_WIN32_WINNT && WINVER < 0x0400 && _WIN32_WINNT > 0x0400) { But I feel it doesn't look good in complex pre-processor to D... YT "Robert" <no spam.ne.jp> wrote in message news:buqh4s$20a8$1 digitaldaemon.com...How about the following? version(A, B, C) { // <- Here! version = D; } instead of version(A) { version = D; } version(B) { version = D; } version(C) { version = D; } Ditto debug.
Jan 23 2004
"Y.Tomino" <demoonlit inter7.jp> wrote in message news:buqq68$2g1i$1 digitaldaemon.com...If you request the power like #if of C, I think we need version ID "expression". For example, "windows.h" has this line: #if !defined(_68K_) && !defined(_MPPC_) && !defined(_X86_) && !defined(_IA64_) && !defined(_AMD64_) && defined(_M_IX86) version(!_68K_ && !_MPPC_ && !_X86_ && !_IA64_ && !_AMD64_ && _M_IX86) { "&&" "||" "!", and, version numbers are necessary every ID. #if defined(_WIN32_WINNT) && (WINVER < 0x0400) && (_WIN32_WINNT > 0x0400) version WINVER = 0x0501; version _WIN32_WINNT = 0x501; version(_WIN32_WINNT && WINVER < 0x0400 && _WIN32_WINNT > 0x0400) { But I feel it doesn't look good in complex pre-processor to D...I've seen many constructs like the above, and they scream "rewrite the code" to me.
May 02 2004
I suppose so. But there are codes in "windows.h". I've wanted to convert mechanically. Thank you. YT "Walter" <newshound digitalmars.com> wrote in message news:c74nba$s6b$1 digitaldaemon.com..."Y.Tomino" <demoonlit inter7.jp> wrote in message news:buqq68$2g1i$1 digitaldaemon.com...0x0400)If you request the power like #if of C, I think we need version ID "expression". For example, "windows.h" has this line: #if !defined(_68K_) && !defined(_MPPC_) && !defined(_X86_) && !defined(_IA64_) && !defined(_AMD64_) && defined(_M_IX86) version(!_68K_ && !_MPPC_ && !_X86_ && !_IA64_ && !_AMD64_ && _M_IX86) { "&&" "||" "!", and, version numbers are necessary every ID. #if defined(_WIN32_WINNT) && (WINVER < 0x0400) && (_WIN32_WINNT >code"version WINVER = 0x0501; version _WIN32_WINNT = 0x501; version(_WIN32_WINNT && WINVER < 0x0400 && _WIN32_WINNT > 0x0400) { But I feel it doesn't look good in complex pre-processor to D...I've seen many constructs like the above, and they scream "rewrite theto me.
May 03 2004