T.R | Title | User | Personal Name | Date | Lines |
---|
2181.1 | pre-increment uses ++prefix, post-increment uses postfix++ | XDELTA::HOFFMAN | Steve, OpenVMS Engineering | Wed May 07 1997 12:05 | 10 |
|
With ++tim, the value before the increment is used, while with tim++,
the value after the increment is used. In either case, the value is
incremented.
The compiler-specific order of evaluation -- which doesn't factor in
with this particular code fragment -- is also an important consideration.
This appears to be a bug in T5.2-006, and your workaround should operate
as expected on both DEC C T5.2-006, DEC C V5.2-003, and other C compilers
|
2181.2 | | WIBBIN::NOYCE | Pulling weeds, pickin' stones | Wed May 07 1997 12:21 | 7 |
| No, Steve, you've got it backwards.
++tim increments tim, then uses the new result.
tim++ uses the old value, then increments tim.
It looks as if the "T" version is broken, but the "V" version works.
|
2181.3 | ignoranaleptic seizures | XDELTA::HOFFMAN | Steve, OpenVMS Engineering | Wed May 07 1997 12:38 | 4 |
| :No, Steve, you've got it backwards.
Whoops -- brain cramp.
|
2181.4 | thanks | MILORD::BISHOP | The punishment that brought us peace was upon Him | Wed May 07 1997 13:24 | 7 |
| thanks guys...what I expected (except for Steve's
open-foot-insert-mouth routine. :-)
Right now, there are some very happy devos in EDO who are no longer
suffering from horrendous hangs in the System Code Debugger...
- Richard.
|