[mesa-users] A question from pgstar's beauty salon
Alfred Gautschy
alfred at gautschy.ch
Wed Sep 9 15:27:51 EDT 2015
Rob
Thanks a lot for looking into the pgstar "problem" I whined about - and
of course for the suggested solution to it. I just come back from trying
it out:
In my inlist.pgstar, I required, for the 3 mass points case:
profile_mass_point_symbol_scale(1)= <a number>
profile_mass_point_symbol_scale(2)= <another number>
profile_mass_point_symbol_scale(3)= <and yet another one>
and it works perfect!
>From your " ... x(1)=1,1,1 !yes this works even though it looks like it
should be invalid" I take that you are a young man ;-) In the era when
F77 was still young and exciting we used to do things like x(1)=1,1,1;
this works because FORTRAN is a "call by reference" language, i.e. in
principle the coder only has to provide the starting point to a variable
- arrays of any kind are particularly attractive - this then points to
the appropriate memory location and -- iff he/she really knows what
he/she does -- very efficient computational work can then be done
relative to the starting memory position. ... and of course you could
generate very "interesting" crashes. (This all refers to a time when we
did not know about flattening, slicing and all that stuff to torture
arrays; not to speak of "structures" ;-]) ... anyway, be this enough of
ancient history.
>From my initial question you can deduce that I did not make the
connection to the "call by reference" roots of FORTRAN -- actually, it
did not and probably never would have dawn on me that
profile_mass_point_symbol_scale is NOT a scalar.
Thanks again - eventually pgstar plots are as beautiful as I wish ...
for the moment.
Regards, Alfred
More information about the Mesa-users
mailing list