Re: A petition to J3 apropos FORTRAN's future

From: James Giles (jamesgiles_at_worldnet.att.net)
Date: 02/22/04


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


Relevant Pages

  • Re: Uninitialized variables
    ... James Giles wrote: ... if error-prone language feature. ... Gary Scott ... Fortran Library: http://www.fortranlib.com Support the Original G95 Project: http://www.g95.org -OR- ...
    (comp.lang.fortran)
  • Another appeal to James Giles
    ... James Giles wrote: ... > language that their colleagues and management keep pushing them ... presaged the behavior of the Fortran high-priests as they went about ... add a very small contrlled number of features and C-interop and we have ...
    (comp.lang.fortran)
  • Re: Who uses clapack?
    ... > James Giles wrote: ... though they could easily interoperate with each-other. ... sometimes for no discerable reason: ... mangling before ...
    (comp.lang.fortran)
  • Re: Who uses clapack?
    ... > James Giles wrote: ... though they could easily interoperate with each-other. ... sometimes for no discerable reason: ... mangling before ...
    (sci.math.num-analysis)
  • Re: Fortran - a "technology that refuses to die"
    ... > James Giles was almost, but not quite, entirely unlike tea: ... we had the recent discussion about assignment operators ... The actual test were with instrumented versions of a language ... side-effect operators of *any* kind that have problems. ...
    (comp.lang.fortran)