-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Wednesday 22 September 2004 23:39, Catherine Moroney wrote:
> Here's a sample of the code. This seems to be behaving
> according to my naive expectations - incrementing isds
> by one every time and then using that incremented value
> as the array index.
>
> But, it is a valid point that I'm using an "iffy"
> construct to avoid a very simple "isds = isds+1" statement
> before each pointer assignment. If my program later blows
> up on me, I may go back and do just that. Maybe I'm trying
> to be too clever for my own good.
>
> flt_data(add1(isds))%x => qa_data%wind_data%lo_wind_ns%value
> int_data(add1(isds))%x => qa_data%wind_data%lo_wind_ns%count
> flt_data(add1(isds))%x => qa_data%wind_data%lo_wind_ew%value
> int_data(add1(isds))%x => qa_data%wind_data%lo_wind_ew%count
What about
call insert (flt_data, isds, qa_data%...)
call insert (int_data, isds, qa_data%...)
with a local function "insert" that is overloaded for flt and int data?
I'm sure your eventual use is more complicated, but if you write a
function/subroutine that does more than just increase an index, i.e.,
actually inserts the data where you want it inserted into, then things
might look nicer.
- -erik
- --
Erik Schnetter <[log in to unmask]> http://www.aei.mpg.de/~eschnett/
My email is as private as my paper mail. I therefore support encrypting
and signing email messages. Get my PGP key from www.keyserver.net.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFBUfbUm3uiSwno3f0RAlO5AKC60FtWWGASHaxCPXfRzzRm2DV26QCgiC8l
L1NVEeP34jJoQhOFYidOAnU=
=nIaN
-----END PGP SIGNATURE-----
|