Re: save statement in a module



David Thompson wrote:
(snip, I wrote)

Just to complicate things more, some versions of unix have
the 'sticky bit':

http://en.wikipedia.org/wiki/Sticky_bit

In this case, static storage of a program does not go away
when the program finishes, but stays around in swap space. If the
program is run again, previous values for such static data will
still be available.

I don't think so. What wikipedia says, and what I remember, is that
sticky is only for pure text aka code, and possibly pure = readonly
data. But Fortran (standardly) has no way of making _variables_
readonly.

Well, I am sure Fortran doesn't have standard ways for two tasks
to share the same storage and properly update shared data.

It seems that it might be TOPS-10 (The DEC OS for the PDP-10)
that I was remembering. I am told that it does have that ability
(and does run Fortran). I don't know if the sticky bit could
be misused for this feature, or not.

-- glen

.



Relevant Pages

  • Re: save statement in a module
    ... sticky is only for pure text aka code, ... Any data changes would have to be in the/a writable data ... couldn't be shared and couldn't be sticky. ... early Unix Fortrans actually used it this way, ...
    (comp.lang.fortran)
  • Re: save statement in a module
    ... sticky is only for pure text aka code, ... Thus you could get 'previous' values of static data only ... for a new program execution = process in Unix. ...
    (comp.lang.fortran)