Re: violating procedure calling convention
- From: dj3vande@xxxxxxxxxxxxxxxxxxxxxxxxxxxx (Dave Vandervies)
- Date: Fri, 13 Apr 2007 16:49:47 +0000 (UTC)
In article <1176482095.827441.157060@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
KIRAN <kiraank@xxxxxxxxx> wrote:
hi,
the grammer for any programming language says that when a function is
called by another function,the callee after executing it's body should
return to the point where it left in the caller..
The grammar says no such thing. The grammar only describes syntax;
what happens when it runs is a matter of semantics.
Is there any technique to make the callee to return to some other
point(within the current process) other than the callee by changing
the call stack in callee...
Use INTERCAL, which has a COME FROM statement for precisely this purpose.
Alternatively, use a functional programming language that lets you use
explicit continuations and invoke a continuation instead of returning.
Both of these can be done in (correct, portable) C if you try hard enough,
but You Don't Want To Do That. Either re-frame the problem to fit your
tools or choose your tools to fit the problem.
dave
--
Dave Vandervies dj3vande@xxxxxxxxxxxxxxxxxxx
He doesn't strike me as a learner, somehow. Let's hope we're wrong.
--Richard Heathfield in comp.lang.c
.
- Follow-Ups:
- Re: violating procedure calling convention
- From: Tak-Shing Chan
- Re: violating procedure calling convention
- References:
- violating procedure calling convention
- From: KIRAN
- violating procedure calling convention
- Prev by Date: Re: Abusing C/C++ comments
- Next by Date: Re: Abusing C/C++ comments
- Previous by thread: violating procedure calling convention
- Next by thread: Re: violating procedure calling convention
- Index(es):
Relevant Pages
|