From: Lynn McGuire on
> Why do you seek to use EQUIVALENCE? If the only answer is conservation of memory, the answer to your problem is: remove the
> EQUIVALENCE statements! The 8 MB of memory in consideration is a drop in the bucket.

Please note that this was an extremely simplified version of my
problem. As noted before, we actually dynamically allocate our
memory and use anywhere from 10 MB to 500 MB of ram per run. So
double or triple allocating memory would not work on any memory
constrained machines.

Thanks,
Lynn
From: Lynn McGuire on
> I'd like to poke around a little but after the last couple of weeks of mostly sitting around and waiting, we're now in wheat harvest
> "in anger" and won't have much time for a while to do more than just look in quickly while checking weather/markets/etc., ...

Have fun reaping the wheat ! I think that I will pass with my
allergies (I have bailed hay before - that was the hardest I ever
worked in my life).

> I see in passing somebody else later on mentioned that there are a few compilers that implement the DEC STRUCTURE; they obviously
> have forgotten or don't know about the side issues w/ initialization so we've (yet again) come full circle it would seem in the
> discussion... :)

Yup. Gotta burn that bridge first <g>.

Thanks,
Lynn

From: jfh on
On Jun 24, 4:43 am, Lynn McGuire <l...(a)winsim.com> wrote:
> > I note from Fortran 2003, 15.2.3:
> >    "There is no Fortran type that is interoperable with a C union type."
>
> Yes, I am becoming painfully aware of that !
>
> > As far as the Fortran standard, there is no requirement that double
> > precision and character*8 have the same size.  It might be slightly
> > better to use REAL*8 instead, though that makes it non-standard
> > in a different way.
>
> I need the character*8 type badly.  Did I mention that we have a
> fortran 66 interpreter built into our app for our users to add
> custom calculations ?  At least one of our users has over 10,000
> lines of our inline fortran built into their models.  Yes, the
> interpreter is written in f77 code.  But, I could possibly change
> the character*8 to character*4 if I had to.

Nobody seems to have mentioned using transfer (already OK in f95)
instead of equivalence. If cstuff is character*8 and dpstuff is a
real 8-byte kind (which is double precision in many but not all
systems, and real(8) has 8 bytes in many but not all systems) then
conversions can go like this:

dpstuff = transfer(cstuff,dpstuff)
cstuff = transfer(dpstuff,cstuff)

Cstuff and dpstuff may be scalars or arrays. Transfer has a third
optional argument, size. RTFM.

-- John Harper
From: dpb on
Lynn McGuire wrote:
....

> Have fun reaping the wheat ! I think that I will pass with my
> allergies (I have bailed hay before - that was the hardest I ever
> worked in my life).
....
Indeed...the hayfever problems as a kid were one of the reasons I went
off to engineering school instead of "staying down on the farm" then.

Now, one can at least avoid the worst of it most of the time and I seem
to have become somewhat less susceptible w/ age (or more inured, I don't
know which) :) Wheat is, at least, much cleaner and less irritating
than the milo (grain sorghum) dust in fall...

Damp this AM so we're waiting again...about 3/4-way thru; roughly
another 140-160 A left. Yields average for most part test weights
running 60-62 lb which is good. Since at first of March didn't think
there would be anything to even start the machines up for, it's a good
year. Got a couple of nice wet snows w/o wind (truly remarkable for
that out here) and then another rain about two weeks later starting in
about middle of March that salvaged what otherwise was looking to be a
complete failure. Of course, there's always a dark side since markets
are down since there is any at all and there's an unusually large carry
over from last year owing to world economic conditions having put a
major damper on export sales. But, looks like we'll get by for another
year to satisfy the banker until the next crisis... :)

Re: your haying experience as a lad...that's a far cry different than
years ago, too, w/ the large round or square bales. Neighbor still puts
up some small squares for the horse folks or the 4H project-level stuff
and do say if didn't have a loader I'd agree it would be a no-win deal.

We were still binding (w/ an old McCormick twine binder) and
hand-shocking feed when I was a kid. Digging them out of the snows and
the drifted sand was a joy...at least the stationary thresher was gone
so weren't still threshing wheat that way (altho I do have picture of my
Grandad w/ the crew in early 20s)... :)

Enough reminiscing...got to head out and service up for when the
dewpoints drop enough.

--