On 04/06/05, Brian Foster <blf at blf.utvinternet.ie> wrote:
> | > there is the curious belief that expr(1) does FP
> | > (floating point) math, or at least FP comparisons.
> | No there isn't.
> | sed is used to manipulate gcc_version so that
> | FP ordering is respected by the lexicographic
> | comparison.
>> YES there is. in v0.3, there is a comment before
> the sed(1) saying:
>> #manipulate version so can do floating point comparisons
>> ergo, there is what I said: a "curious belief".
> the comment proves that at one time, someone did
> think something — presumably expr(1) — did FP.
>> does this matter? Yes! a casual reader of the
> script could easily be mislead. comments matter.
I'm not going to speculate on anyone's beliefs (curious or otherwise :).
So I won't speculate on how you are interpreting the comment.
But to me that comment says
"we need to munge gcc_version to achieve the effect of a FP comparison".
Nowhere is it suggested that expr on its own can do FP comparisons.
Quite the contary; sed is only used because the author is aware of
the expr limitation, and without the sed, I can't see the need for the
comment in question.
Kieran Tully, Software Developer and Tenor
Reply to Kieran.Tully AT acm.org
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!