Phillip Helbig writes:
> What you need are pointers to functions....
> At least since F77, you can pass the
> NAME of a routine to another routine (and to another, etc). However,
> these are not character strings, but routine names. Thus, they have to
> be hard-wired into the code, i.e. one cannot read them from a file etc
> without a workaround similar to the one above.
Pointers to functions aren't going to change that. There is no way in
any standard, present or proposed, to take a string and convert it to
a reference to a procedure name.....or for that matter to a variable
name. This is much the same difficulty you'd run into in trying to
write your own version of Namelist - you can't turn strings into
variable/procedure/anything references without *VERY* system-dependent
references to things like system internal name tables.
Appropriate pointers might well be usable with the aid of such
system-dependent stuff - as a pointer might well be what such
a system-dependent functions would return.
--
Richard Maine
[log in to unmask]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|