??? 08/07/06 15:42 Read: times |
#121794 - to keep hacking at fundamentally wrong code serves Responding to: ???'s previous message |
what's fundamentally wrong on a delay loop? in C Except that the delay time cannot be guaranteed from chip to chip, from compiler to compiler; once tried/checked, it should be the same all the time.
that is not true. Any recompile is likely to change the delay, nobody I know keep old versions of the compiler around in order to compile project a with ver 3.11, project b with ver 4.03 .... Even a change e;sewhere in the code can do it. To illustrate, I recall an old project that had a 'funny' problem: during developement some compiles 'worked', some 'kind of worked' The 'kind of worked' was ignored for a while because the part being developed could be executed in both cases. It turned out that the linker for some builds put a given routine in slower code memory and for some builds it went to faster code memory. While no one in his right mind uses external code memory today, it serves to illustrate that a totally unrelated change can affect unchanged code. It's certainly not nice, but it is not THAT wrong. anything that can fail IS "THAT wrong" More importantly, there is something ELSE wrong, which will most probably exhibit itself in the politically correct version, too. not "politically correct" but "fundamentally correct". It may very well be so, but to keep hacking at fundamentally wrong code serves no purpose and is a total waste of time. Erik |