Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: Do function arguments invoke a function? |
| Date | 2015-10-04 15:36 -0700 |
| Organization | None to speak of |
| Message-ID | <ln612mxnuh.fsf@kst-u.example.com> (permalink) |
| References | <eaba057c-8bec-449a-8055-039f2c314655@googlegroups.com> |
Chad <cdalten@gmail.com> writes:
> In Java, when a method is called, the methods arguments invoke the
> method. Do functions in C do something similar?
As others have suggested, that statement about Java doesn't seem to make
sense.
The Java Language Specification describes run-time method invocation as
a 5-step process. Evaluating the arguments is step 2; transferring
control is step 5.
I'm no expert on Java, so perhaps I'm missing something. In any case,
it doesn't make sense in C.
A C function call evalautes the prefix (which is usually just a funciton
name), evaluates the arguments, and invokes the function. Invoking the
function assigns the argument values to the parameters before the body
of the function starts executing.
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Do function arguments invoke a function? Chad <cdalten@gmail.com> - 2015-10-04 02:15 -0700
Re: Do function arguments invoke a function? Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-10-04 08:09 -0400
Re: Do function arguments invoke a function? Chad <cdalten@gmail.com> - 2015-10-04 13:52 -0700
Re: Do function arguments invoke a function? Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-10-04 17:13 -0400
Re: Do function arguments invoke a function? James Kuyper <jameskuyper@verizon.net> - 2015-10-04 17:13 -0400
Re: Do function arguments invoke a function? Geoff <geoff@invalid.invalid> - 2015-10-04 17:09 -0700
Re: Do function arguments invoke a function? Geoff <geoff@invalid.invalid> - 2015-10-04 17:10 -0700
Re: Do function arguments invoke a function? Chad <cdalten@gmail.com> - 2015-10-04 19:50 -0700
Re: Do function arguments invoke a function? James Kuyper <jameskuyper@verizon.net> - 2015-10-05 00:26 -0400
Re: Do function arguments invoke a function? James Kuyper <jameskuyper@verizon.net> - 2015-10-04 12:59 -0400
Re: Do function arguments invoke a function? James Kuyper <jameskuyper@verizon.net> - 2015-10-04 14:36 -0400
Re: Do function arguments invoke a function? jacobnavia <jacob@jacob.remcomp.fr> - 2015-10-04 19:26 +0200
Re: Do function arguments invoke a function? Keith Thompson <kst-u@mib.org> - 2015-10-04 15:36 -0700
Re: Do function arguments invoke a function? Rosario19 <Ros@invalid.invalid> - 2015-10-05 05:49 +0200
csiph-web