11 ms·
I have to wonder if someone who can't determine order of execution should be an electrician or plumber either -- those aren't static systems!
by Sniffnoy 15y ago
I have to wonder if someone who can't determine order of execution should be an electrician or plumber either -- those aren't static systems!
- JonnieCache 15y agoI guess the point is that there's no "privileged" position in these systems which changes with time, like the point of execution in programming. What is the proper name for the bit of code that's currently being executed? I've suddenly realised that its a concept you think about constantly when coding, but its so much a part of the scenery so to speak that you never consciously consider it.
- kennywinker 15y agoTop of the stack?
- Zaak 15y agohttp://en.wikipedia.org/wiki/Coroutine http://en.wikipedia.org/wiki/Coroutine
- Sniffnoy 15y agoProgram counter?
- Androsynth 15y agoAt the hardware level it's called the program counter, which is a register containing the address of the current operation the processor is running. After the operation is finished, it increments itself and moves to the next step in the program. Edit: just realized I didn't really answer the question, I believe what your actually talking about is a statement. I usually jump at the chance to talk about stuff from my old EE days :)
- Zaak 15y agoThe program counter isn't the only element of that "what the program is doing now" state though. The context in which the current instruction is being executed makes a world of difference.
- vogonj 15y agoinclusive of that, the best term is probably "machine state" or similar.
- calloc 15y agoI consider the "context" the scope. What is the scope in which the current statement is being executed...
- jpendry 15y agoAnd the ability to save all of that into a variable so that you can pass it around to other parts of your program means that your programming language supports Continuations.
- sounds 15y agoCurrent instruction or active instruction (at the processor level) Currrent statement or active statement at the code level
- 5hoom 15y agoThat's an interesting point. I know that when I'm in the flow coding, there is a sort of Tick:the-program-does-this, Tock:the-program-does-that stepwise execution of the code in my head. There are many answers as to what the hardware is actually doing with the instructions, but more generally what exactly is the name of an imaginary discrete state of a program that currently only exists in a coders head?
- JonnieCache 15y ago>but more generally what exactly is the name of an imaginary discrete state of a program that currently only exists in a coders head? This is what I'm trying to get at. There isn't one is there? It's weird.
- sambeau 15y agoWhat is the proper name for the bit of code that's currently being executed? I would have used 'Cursor' or 'Program Cursor'. But I'm now convincing myself that that a database term.
- mrb 15y agoOn the amd64/i386 platforms, the Instruction Pointer CPU register points to the executed instruction. Its name is IP for 16-bit code, EIP (extended) for 32-bit code, or RIP (register) for 64-bit code.