Re: restated question about externals



On 2005-10-04 11:42:09 -0300, "Jugoslav Dujic" <jdujic@xxxxxxxxx> said:

apm wrote:
| Does the standard in some direct, indirect or convoluted manner require that
| the caller of an EXTERNAL maintain the stack?

No.

The standard does not even know what stack is. It wouldn't surprise me
if there was a Fortran for stackless machines.

Most early Fortrans were based on static allocation and that even included the aguement lists and return addresses. If you inadvertently had a recursive call there was no way back as the return would always be to one self (or the daisy chain). Stacks were a new fangled thing associated with the minicomputers like the various PDPs. Which as was recently noted were not computers to fool the bean counters and paper pushers.

CVF has (had?) the default calling convention STDCALL, where the callee
cleans the stack. IVF (and possibly others) have that as an option. If the
compiled code is standard-conforming, the stack cleaning mechanism doesn't
matter.

| Fortrans I've used seem to work this way. I'd feel better if it in some way
| were required by the standard.

My condolence :-).


.



Relevant Pages

  • Re: Is C99 the final C? (some suggestions)
    ... > Dijkstra's weighted shortest path algorithms were nice for client-server based ... but the future is peer 2 peer. ... >>The C standard specifies what is UB and what's not. ... I can do no such thing with stack ...
    (comp.lang.c)
  • Re: Is C99 the final C? (some suggestions)
    ... > the standard? ... There doesn't have to be any mention of "stack" in what I try to ... "There are five standard signed integer types, ... standard-like language. ...
    (comp.lang.c)
  • Re: The Art and Science of Factoring
    ... Even the following is not nesting. ... It also means it has extended beyond what is required by the standard. ... In some systems that data is left on the stack, ... overwrites the data from the first definition, ...
    (comp.lang.forth)
  • Re: Toward a Forth thats easier to learn
    ... Because loops use the return stack. ... standard. ... portability. ... I'm saying that writing standard code demands new ...
    (comp.lang.forth)
  • Re: restated question about externals
    ... | the caller of an EXTERNAL maintain the stack? ... The standard does not even know what stack is. ... if there was a Fortran for stackless machines. ...
    (comp.lang.fortran)