Headline

A data structure maintaining ongoing calls in a program

Illustration

Consider the following Language:Java program for illustration:

public class Demo {
	public static int max(int x, int y) {
		if (x>y)
			return x;
		else 
			return y;
	}
	public static void main(String[] args) {
		int x = 101;
		int y = 88;
		int z = 42;
		out.println(max(y, z));
		out.println(max(x, y));		
	}
}

Both the main and the max function declare variables x and y. When main calls max, then the call stack helps avoiding confusion between these variables of the same name (and type). That is upon starting the called method, a return address is saved and a "frame" for the local variables is created. Without such an extra frame, the fist invocation of max would override the variable x in main.


There are no revisions for this page.

User contributions

    This user never has never made submissions.

    User edits

    Syntax for editing wiki

    For you are available next options:

    will make text bold.

    will make text italic.

    will make text underlined.

    will make text striked.

    will allow you to paste code headline into the page.

    will allow you to link into the page.

    will allow you to paste code with syntax highlight into the page. You will need to define used programming language.

    will allow you to paste image into the page.

    is list with bullets.

    is list with numbers.

    will allow your to insert slideshare presentation into the page. You need to copy link to presentation and insert it as parameter in this tag.

    will allow your to insert youtube video into the page. You need to copy link to youtube page with video and insert it as parameter in this tag.

    will allow your to insert code snippets from @worker.

    Syntax for editing wiki

    For you are available next options:

    will make text bold.

    will make text italic.

    will make text underlined.

    will make text striked.

    will allow you to paste code headline into the page.

    will allow you to link into the page.

    will allow you to paste code with syntax highlight into the page. You will need to define used programming language.

    will allow you to paste image into the page.

    is list with bullets.

    is list with numbers.

    will allow your to insert slideshare presentation into the page. You need to copy link to presentation and insert it as parameter in this tag.

    will allow your to insert youtube video into the page. You need to copy link to youtube page with video and insert it as parameter in this tag.

    will allow your to insert code snippets from @worker.