C vs. FORTRAN

Herman Rubin cik at l.cc.purdue.edu
Tue Jul 5 21:44:25 AEST 1988


In article <870 at garth.UUCP>, smryan at garth.UUCP (Steven Ryan) writes:

		........

> It is important to realise that a variable length argument list is variable
> length from the called routine's point of view, not the caller's--it has the
> argument list right there in its greedy little hands.
> 
> I saw two methods: a 170 appends a zero word terminator to the argument list.
> A 205 passes the argument list length in the length field of argument list
> point.

The use of a zero terminator works because FORTRAN uses call by address,
and zero is not a legal address in FORTRAN.  On some machines, zero cannot
be a legal address for anything, so it would work for all calls by address
in all languages.  

-- 
Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907
Phone: (317)494-6054
hrubin at l.cc.purdue.edu (ARPA or UUCP) or hrubin at purccvm.bitnet



More information about the Comp.lang.c mailing list