Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Structure programming

Status
Not open for further replies.

Lauro

Programmer
Jul 29, 2001
10
BR
Hi all!!!

Well, guys I'd like to know what means "Structure Programming" and what is a structured language?
 
Structured programming involves taking a single large task and breaking it into a group of intermediate pieces.

Then take each of those smaller intermediate pieces and continue breaking them into smaller groups of pieces (as needed) until you end up with the smallest functions that each do a single task. It's similar to making an outline for a speech.

Your code ends up looking like this:


main()
{
DoMainTask();
}

void DoMainTask()
{
DoTask1();
DoTask2();
}

void DoTask1()
{
printf{"this is Task 1, which is simpler than Task 2\n");
}

void DoTask2()
{
DoTask2SmallerThing1();
DoTask2SmallerThing2();
}

void DoTask2SmallerThing1()
{
printf("This is Task 2, smaller thing 1\n");
}


void DoTask2SmallerThing2()
{
printf("This is Task 2, smaller thing 2\n");
}


/* Hope this helps! */
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top