Dear Canguo,
> Thank you very much for offering answer and help to my question on how to
> read key'ed free formatted ascii data. I've tried to understand your code
> (perhaps a schematic one). I believe it does the job. However, it seems
> FFKEY is called for each integer or float number or an 1-d array. Then does
> this mean a card can contain only a single integer or a float number
> or an 1-d array?
Yes. Available types are INTEGER, REAL and 1-dim array of INTEGER of FLOAT.
It is possible to add CHARACTER type too.
> > ffkey_(key,ptr,Nvar,type,strlen(key),strlen(type));
>
> Is this the way to call fortran subroutine ffkey_ (in FFREAD package) --
> adding 2 more arguments strlen(key), strlen(type) in the call?
Exactly. I work on PC under Linux OS. If you pass character variable for
fortran subroutine you must add it length to arguments list also.
> I understand
> fortran would require this info, but is the order implementation-independent?
It works under Linux, HP-Unix. May be on other Unixes too. And it definitly
should not work on M$Windows XXX.
> Then I still need to "order" some features for the evolving ROOT, that
> utilities for reading key'ed free format data cards be available.
> I'm still in the process studying Rene Brun's reply(thanks to Rene), and
> learning ROOT basics. I hope the answer is already in the ROOT.
Please, use C++ code instead of FFREAD packet. Your code will be easy and
more flexible. (I use FFREAD only because it is used in GEANT321.)
With best wishes,
Alexander.