D - bug ( |= )
- Carlos Santander B. (17/17) Feb 05 2003 This:
- Burton Radons (4/16) Feb 05 2003 It shouldn't produce an error, but it's invalid code: "bit" is not an
- Mike Wynn (7/23) Feb 06 2003 There is a difference between
- Burton Radons (3/10) Feb 06 2003 C 101 time eh. || is also a sequence point, so "a ++ || a ++" has a
This: bit b; ... b|=(x==y); produces this: Internal error: ..\ztc\glopp.c 1619 But if I change it to: b=b|(x==y); it says 'cannot implicitly convert int to bit', so I had to do this: b=cast(bit)(b|(x==y)); I think it's kind of weird. Just in case, I prefer to use bits for booleans. ------------------------- Carlos Santander --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.449 / Virus Database: 251 - Release Date: 2003-01-27
Feb 05 2003
Carlos Santander B. wrote:This: bit b; ... b|=(x==y); produces this: Internal error: ..\ztc\glopp.c 1619It shouldn't produce an error, but it's invalid code: "bit" is not an integer type.But if I change it to: b=b|(x==y);Use "b=b||(x==y);".
Feb 05 2003
There is a difference between b|c and b||c b|c should always be eval'ed. ( a|b|c) (should not produce jumps) ( a || b || c ) should ! "Burton Radons" <loth users.sourceforge.net> wrote in message news:b1squn$131j$1 digitaldaemon.com...Carlos Santander B. wrote:This: bit b; ... b|=(x==y); produces this: Internal error: ..\ztc\glopp.c 1619It shouldn't produce an error, but it's invalid code: "bit" is not an integer type.But if I change it to: b=b|(x==y);Use "b=b||(x==y);".
Feb 06 2003
Mike Wynn wrote:There is a difference between b|c and b||c b|c should always be eval'ed. ( a|b|c) (should not produce jumps) ( a || b || c ) should !C 101 time eh. || is also a sequence point, so "a ++ || a ++" has a defined result. But it has nothing to do with Carlos' code.
Feb 06 2003