Re: A petition to J3 apropos FORTRAN's future
From: James Giles (jamesgiles_at_worldnet.att.net)
Date: 02/22/04
- Next message: Jean-Charles: "Fortran for Mac ?"
- Previous message: Ken Plotkin: "Re: timing a program on Windows"
- In reply to: Gary L. Scott: "Re: A petition to J3 apropos FORTRAN's future"
- Next in thread: Gary L. Scott: "Re: A petition to J3 apropos FORTRAN's future"
- Reply: Gary L. Scott: "Re: A petition to J3 apropos FORTRAN's future"
- Reply: Greg Chien: "Re: A petition to J3 apropos FORTRAN's future"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 22 Feb 2004 04:31:43 GMT
Gary L. Scott wrote:
> James Giles wrote:
...
> I've never quite understood the overall value or method of
> implementation of a bit kind. How do you envision that being
> implemented? One of my needs is to be able to create "packed" data
> types...meaning a 1 bit flag followed by an 11 bit real value followed
> by a 24 bit unsigned integer followed by ... packed to the nearest bit
> in memory (must do my own padding if needed of course). [...]
Exactly what I have in mind. Try the following possible syntax
to describe the internal packing of IEEE floats:
Type aReal
integer(one_bit) :: sign
integer(eight_bits) :: exponent
integer(twenty_three_bits) :: significand
End type aReal
That's all packed into 32-bits. It requires bit resolution KINDs.
Using an UNSIGNED integer in this instance would be good too.
This is much easier than having to remember how much to shift
or which bits to extract in a bit substring. You just have names
for the relevant components.
I don't know what an 11 bit real is, but if you'll give an example
we could discuss it.
>> Of course, your definition of "system" programming may be different
>> than mine. My definition is that the language has all the capabilities
>> to access the basic features of the hardware. You may believe that the
>> ability to interoperate with C (or some similar language) is part of
>> the definition of "system" programming.
>
> I personally don't view C interoperability to be the final answer to
> system programming in Fortran. I see it as very valuable though.
It's only even relevant as long as systems are written in C derived
languages. Since that's a mistake anyway, I look forward to the day
when systems are available that aren't written in C, and even systems
for which there are no C implementations present.
-- J. Giles
- Next message: Jean-Charles: "Fortran for Mac ?"
- Previous message: Ken Plotkin: "Re: timing a program on Windows"
- In reply to: Gary L. Scott: "Re: A petition to J3 apropos FORTRAN's future"
- Next in thread: Gary L. Scott: "Re: A petition to J3 apropos FORTRAN's future"
- Reply: Gary L. Scott: "Re: A petition to J3 apropos FORTRAN's future"
- Reply: Greg Chien: "Re: A petition to J3 apropos FORTRAN's future"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|