|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
D - (value) gives odd error [remove c style casts]
the following will not compiler (0.50)
import windows;
int main( char[][] args )
{
/* fine */
int x = WS_VISIBLE & ~(WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_SYSMENU);
/* error */
int u = (WS_VISIBLE) & ~(WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_SYSMENU);
return 0;
}
gives the error
libtest.d(9): 'TOK8065536 | 131072 | 524288' is not an lvalue
I assume this is due to the parser thinking (WS_VISIBLE) is a cast
I vote for the removal of c style casts;
Mike.
Dec 07 2002
"Mike Wynn" <mike.wynn l8night.co.uk> wrote in message news:ast7na$1uf9$1 digitaldaemon.com...gives the error libtest.d(9): 'TOK8065536 | 131072 | 524288' is not an lvalue I assume this is due to the parser thinking (WS_VISIBLE) is a cast Dec 14 2002
Walter wrote:"Mike Wynn" <mike.wynn l8night.co.uk> wrote in message news:ast7na$1uf9$1 digitaldaemon.com...gives the error libtest.d(9): 'TOK8065536 | 131072 | 524288' is not an lvalue I assume this is due to the parser thinking (WS_VISIBLE) is a cast Dec 28 2002
I'm sorry. I've found already out about the cast keyword. It's a good decision. I expected to find it in the 'types' section of the manual. But it's ok in 'expressions' too. Sorry again. Ilya Minkov wrote:Walter wrote:"Mike Wynn" <mike.wynn l8night.co.uk> wrote in message news:ast7na$1uf9$1 digitaldaemon.com...gives the error libtest.d(9): 'TOK8065536 | 131072 | 524288' is not an lvalue I assume this is due to the parser thinking (WS_VISIBLE) is a cast Dec 29 2002
"Ilya Minkov" <midiclub 8ung.at> wrote in message news:aunngt$dlf$1 digitaldaemon.com...I expected to find it in the 'types' section of the manual. But it's ok in 'expressions' too. Dec 31 2002
|