Print

Print


On Oct 25, 2005, at 8:39 PM, robin wrote:

> From: Richard E Maine <[log in to unmask]>
> Date: Wednesday, 26 October 2005 5:54

>> Indeed, such programs exist. In particular, there are programs
>> that intentionally generate an eof condition (quite plausibly using an
>> empty file), see what iostat value resulted, and subsequently check 
>> for
>> that iostat value to flag eof.
>
> While that might be strictly to the letter of the law,

I disagree with the "might" part of the above, except to the extent 
that one can prefix pretty much any true statement with "It might be 
true that" and still have a true statement.

>  it is not a sensible
> use of the value, which, by implication of the definition,
> is intended to be compiler-dependent and therefore even to be hidden.

I think I will avoid arguing with you about what constitutes "sensible" 
use. I rather doubt we would ever come to agreement on such things, it 
being hard enough to come to agreement over factual matters. Let it 
just be said that I disagree with you, and expect to continue to do so.

> If -- as is perfectly valid -- the vendor were to change the
> value used from one release to another, and one were to rely on that
> particular value -- then voila, one would have a non-working program.

You misunderstand the factual part here. The programs, which do exist 
and are portable to all standard-conforming compilers (these are not 
some hypothetical abstractions, but real programs that exist and work), 
compute the value when they run. I'm not talking about programs which 
compute a value and save it in a file or rewrite code for future use. 
As I said, this *IS* standard-conforming and portable to all 
standard-conforming compilers.

It is also true that programs exist that compute and write such things 
into code as named constants, in which case, sure enough, if the 
processor changes, you'll have to recompile the programs.

Let's see. Following similar logic to that advocated, if one compiles a 
program that uses, say, assignment statements, into object code and 
then the compiler release changes so that the object code doesn't link 
correctly, then it won't work. One might thus conclude that assignment 
statements are non-portable, and probably also not sensible things to 
use. :-)

-- 
Richard Maine                |  Good judgment comes from experience;
[log in to unmask]       |  experience comes from bad judgment.
                             |        -- Mark Twain