Re: violating procedure calling convention



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
.



Relevant Pages

  • Re: violating procedure calling convention
    ... called by another function,the callee after executing it's body should ... use a functional programming language that lets you use ... explicit continuations and invoke a continuation instead of returning. ... tools or choose your tools to fit the problem. ...
    (comp.lang.c)
  • Re: Computing in finite fields: what programming langage to choose?
    ... i've some work to do concerning computing in finite fields and i would ... like to know what programming language would fit the best. ... lambda calculus: http://en.wikipedia.org/wiki/Lambda_calculus ...
    (comp.programming)
  • Computing in finite fields: what programming langage to choose?
    ... i've some work to do concerning computing in finite fields and i would ... like to know what programming language would fit the best. ...
    (comp.programming)
  • Re: Computing in finite fields: what programming langage to choose?
    ... i've some work to do concerning computing in finite fields and i would ... like to know what programming language would fit the best. ... Lisp you could create a mini-language within lisp that described finite ...
    (comp.programming)
  • Re: procedure calling convention
    ... the grammer for any programming language says that when function is ... called by another function,the callee after executing it's body should ... Is there any technique to make the callee to return to some other ...
    (comp.programming)