answersLogoWhite

0

What is a programming return address?

Updated: 9/21/2023
User Avatar

Wiki User

12y ago

Best Answer

In structured programming (a method of orderly setting up programs to increase readability of source code, and easier maintenance), segments of code to do specific things are often written...and then have a "return address" at the end of the code segment or subroutine to say where in the main coding the program should continue.

In some languages, like BASIC, this may be a "line number" in the program. In other languages, such a C Programming, it may be a label that has been inserted in the coding to be used as an 'address'.

For example, a program like a sales program may have a subroutine asking the user's gender. Then the gender-asking subroutine may take the user to a listing of men's clothing if he answered male, or a different return address to take her to a list of female clothing if she answered female...and even an error routine's address if the user left the question blank or gave a non-gender answer.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is a programming return address?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Basic Math

When the fn is called where the return address is stored?

heap


In C programming Write a function that returns 1 if its argument is a prime number and returns zero otherwise?

#include<iostream.h> int CheckPrime(int number){ for(int i=2;i<number;i++){ if(number%i==0) return 0; } return 1; } void main() { int num=7; cout<<CheckPrime(num); }


What is the difference between branch instruction call sub routine program and interrupt?

Branch Instruction A branch (or jump on some computer architectures, such as the PDP-8 and Intel x86) is a point in a computer program where the flow of control is altered. The term branch is usually used when referring to a program written in machine code or assembly language; in a high-level programming language, branches usually take the form of conditional statements, subroutine calls or GOTO statements. An instruction that causes a branch, a branch instruction, can be taken or not taken: if a branch is not taken, the flow of control is unchanged and the next instruction to be executed is the instruction immediately following the current instruction in memory; if taken, the next instruction to be executed is an instruction at some other place in memory. There are two usual forms of branch instruction: a conditional branch that can be either taken or not taken, depending on a condition such as a CPU flag, and an unconditional branch which is always taken. Call Subroutine instructions Call Subroutine instructions and Return From Subroutine instructions within the instruction stream. The first stage stores a return address in a return register when a Call Subroutine instruction is predicted. The first stage predicts a return to the return address in the return register when a Return From Subroutine instruction is predicted. A second stage decodes each Call Subroutine and Return From Subroutine instruction in order to maintain a Return Stack Buffer that stores a stack of return addresses. Each time the second stage decodes a Call Subroutine instruction, a return address is pushed onto the Return Stack Buffer. Correspondingly, each time the second stage decodes a Return From Subroutine instruction, a return address is popped off of the Return Stack Buffer. The second stage verifies predictions made by the first stage and predicts return addresses for Return From Subroutine instructions that were not predicted by the first stage. A third stage executes Return From Subroutine instructions such that the predictions are verified. Finally, a fourth stage retires Return From Subroutine instructions and ensures that no instructions fetch after a mispredicted return address are committed into permanent state. Program interrupt an interrupt is an asynchronous signal from hardware indicating the need for attention or a synchronous event in software indicating the need for a change in execution. A hardware interrupt causes the processor to save its state of execution via a context switch, and begin execution of an interrupt handler. Software interrupts are usually implemented as instructions in the instruction set, which cause a context switch to an interrupt handler similar to a hardware interrupt. Interrupts are a commonly used technique for computer multitasking, especially in real-time computing. Such a system is said to be interrupt-driven. An act of interrupting is referred to as an interrupt request ("IRQ").


What basic concepts applicable to life insurance programming also apply to what?

health insurance programming


Convert decimal to binary using recursive function in php programming?

function dec2bin($val){ if($val & 1){ $rval = '1'; }else{ $rval = '0'; } $val >>= 1; if($val > 0){ $rval = dec2bin($val) . $rval; } return $rval; }

Related questions

How does return statement work in vb?

No Return statement in VB programming


What is a return address?

What is a fictitious return address?


What is the use of return function in C programming?

To return the exp. or const to the main fumction.


What is the return address of a return address envelope?

the return adress of a return adress envelope is wherever selena gomez lives.


What is the return address for the Clog Outlet?

The return address for the Clog Outlet is 6505 Pheasant Valley Rd., Dayton, Ohio. This is the exact return address for the Clog Outlet. This address is for people who need to return items.


Do you have to use a return address?

It is a good idea to use a return address when sending a letter. Oftentimes, the post office will not accept a letter that does not have a return address on it.


How many lines should be return ADDRESS?

a return address should have 2 lines


Can you use your foreign address on your tax return?

you can not use your foreign address an a tax return


address for ohio state tax return?

address for ohio state tax return


How do you write a return address on a postcard?

You can write a return address on a postcard by writing it at the end of your note. The front side of the postcard may have a section devoted to a return address.


What are the release dates for No Return Address - 1961?

No Return Address - 1961 was released on: USA: 1961


What is a fictitious return address?

A fictitious return address is an address that does not exist or is not associated with the sender. It is often used to conceal the true identity or whereabouts of the sender for privacy or fraudulent purposes. It can be illegal and unethical to use a fictitious return address, especially when sending mail or packages.