ABSTRACT interfaces + PROCEDURE declarations
Tobias Schlüter
Tobias.Schlueter@physik.uni-muenchen.de
Fri Aug 17 17:03:00 GMT 2007
Hi Janus,
two random observations I made while taking a glance at your code:
Janus Weil wrote:
> + gfc_formal_arglist *curr_arg = src->formal;
...
> + while (curr_arg != NULL)
> + {
...
> +
> + /* Go to the next arg, if any. */
> + curr_arg = curr_arg->next;
> + }
for (curr_arg = src->formal; curr_arg; curr_arg = curr_arg->next)
{
...
}
would be the usual idiom. In your case the loop logic is spread out
over three lines, and the comment does not really help understanding
what's going on because the 'if any' part is in a different place.
Also, I don't think dead statements like this one
> + /* Will reuse for any additional arg(s). */
> + formal_arg = NULL;
are in any way helpful. If I see something like this, I start looking
if there are alternative ways out of the loop (think 'exit;') where
formal_arg == NULL vs formal_arg != NULL would make a difference.
Finally, testcases would be helpful in understanding both what you
achieved so far and what you're trying to achieve. The latter is
important for the simple reason that noone can tell if you and they are
interpreting the standard in the same way. A testcase OTOH documents
what you implemented, and therefore your interpretation of the standard.
Cheers,
- Tobi
More information about the Fortran
mailing list