Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
December 07, 2002 (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. |
December 15, 2002 Re: (value) gives odd error [remove c style casts] | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike Wynn | "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 Yes. > I vote for the removal of c style casts; Yeah, they should go. |
December 29, 2002 Re: (value) gives odd error [remove c style casts] | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | 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
>
>
> Yes.
>
>
>>I vote for the removal of c style casts;
>
>
> Yeah, they should go.
>
>
How do you want to replace them?
|
December 29, 2002 Re: (value) gives odd error [remove c style casts] | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ilya Minkov | 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
>>
>>
>>
>> Yes.
>>
>>
>>> I vote for the removal of c style casts;
>>
>>
>>
>> Yeah, they should go.
>>
>>
> How do you want to replace them?
>
|
January 01, 2003 Re: (value) gives odd error [remove c style casts] | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ilya Minkov | "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. Once the spec is final, I expect to go through it and add a bunch of hyperlinks. > Sorry again. No prob. The spec is a work in progress, and I'm responsible for errors, inconsistencies, and obfuscations in it. |
Copyright © 1999-2021 by the D Language Foundation