Mail Archives: djgpp/1997/08/09/07:53:19
Charles Krug wrote:
>
> To those of you who bit my head off (OUCH) consider the following, which
> came up last week:
>
> if ((get_user_response()) && (format_hard_drive()))
> printf("Hard drive formatted");
>
> Are you willing to bet your hard drive that your compiler is ANSI
> complient?
Let me put it this way:
- If your compiler does not claim to be ANSI compliant, then nothing
like this is safe.
- If your compiler does claim to be ANSI compliant, and this doesn't
work as intended, then you can sue the company that makes it for
zillions of dollars.
- Anybody who runs a program capable of formatting the hard drive
without ensuring that all necessary data is backed up is an idiot.
- No sane person would ever write a format program like that.
Since the order of logical operations is an absolute requirement of the
C language, there is no point to be made by asking what would happen if
it wasn't. It's like that stupid "what if we could attain the speed of
light" thread that was going around not long ago.
P.S.: The first person to actually start that thread again because I
mentioned it will be slapped with a wet trout.
--
---------------------------------------------------------------------
| John M. Aldrich, aka Fighteer I | mailto:fighteer AT cs DOT com |
| Proud owner of what might one | http://www.cs.com/fighteer |
| day be a spectacular MUD... | Plan: To make Bill Gates suffer |
---------------------------------------------------------------------
- Raw text -