Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!purdue!i.cc.purdue.edu!k.cc.purdue.edu!l.cc.purdue.edu!cik
From: cik@l.cc.purdue.edu (Herman Rubin)
Newsgroups: comp.lang.c
Subject: Re: C vs. FORTRAN
Summary: A terminator must be an illegal argument.  This works for
	 call by address
Message-ID: <825@l.cc.purdue.edu>
Date: 5 Jul 88 11:44:25 GMT
References: <3136@phoenix.Princeton.EDU> <225800038@uxe.cso.uiuc.edu> <870@garth.UUCP>
Organization: Purdue University Statistics Department
Lines: 21

In article <870@garth.UUCP>, smryan@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@l.cc.purdue.edu (ARPA or UUCP) or hrubin@purccvm.bitnet