>In article <85...@ihlpb.ATT.COM> nev...@ihlpb.UUCP (55528-Liber,N.J.) writes:
> >[...]the more general problem of determining the size of an array which is
> >passed via a pointer cannot be done in C.
>
>Nor in any other language, [...] You can't tell the size of an object from a
>pointer to it.
Not true for Fortran 77. The semantics of the language require that the size
of a character string argument also be passed to a procedure. The construct
which requires this feature is:
SUBROUTINE FOO(CA)
CHARACTER*(*) CA
:
END
The asterisk in parens forces CA to assume the size of the calling argument on
each instantiation of the procedure.
Joe Korty
uucp!modcomp!joe
Did you READ my article? I made this exact point in the next
paragraph. More than just the pointer is being passed. The length is
being passed separately, although the language hides this. C doesn't
(have hidden arguments).
Jeff Siegal