comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Forcing READ_ASCII output to be a set of strings...
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Forcing READ_ASCII output to be a set of strings... [message #43176 is a reply to message #43142] Fri, 18 March 2005 15:11 Go to previous messageGo to previous message
JD Smith is currently offline  JD Smith
Messages: 850
Registered: December 1999
Senior Member
On Mon, 14 Mar 2005 16:15:43 -0600, Michael Wallace wrote:

>> The reason I thought this would be better as a text default is that you can
>> easily go from string -> number, but you can't go backwards. Considering
>> the input is text, why would they just assume it is filled with floating
>> point numbers? It appears to be completely arbitrary... A string format
>> appears to be the most "generalized" form you could use.
>
> The reason you assume that it's filled with numbers is because it most
> likely is. (Don't you just love circular logic? ;-) ) IDL is built
> around *data* manipulation. We use text files all the time in my
> industry and aside from the header, if present, the contents are all
> numbers. Some of the numbers are integers and some are floating point.
> Obviously, a floating point type covers both cases.

Actually, it doesn't. This is an aside, but you may have wondered how
a little old floating point number which fits in just four bytes could
manage to squeeze all those numbers from 1.17549e-38 to 3.40282e+38 in
there, when a 4 byte integer (aka LONG) only holds from -2147483648 to
+2147483647, and no decimals, to boot. The secret is, it doesn't.
Not by a long shot. Consider the range of 1 trillion integers:

10000000000000000000ULL - 10000001000000000000ULL

How many unique floating point value do you have inside of this range?
None actually. Any such value will be rounded up or down outside of
this range. So if you are using integers to count the quantity of
sand grains in a sandpile, this may not matter much, but if you are
using them to represent an exact serial code or combination to your
bank vault, then this distinction is very important.

JD
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: IDL6.0 and Mac OS 10.3
Next Topic: precedence question

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:33:55 PDT 2025

Total time taken to generate the page: 0.00503 seconds