Home > Common Problem > body text

What is structured programming

小老鼠
Release: 2023-08-10 17:18:04
Original
3039 people have browsed it

Structured programming is a programming methodology that makes programs clearer, easier to understand, and easier to maintain. By dividing a program into different modules and using control structures to organize these modules, structured programming makes the development and maintenance of programs more efficient and reliable. Both beginners and experienced developers should master structured programming. Basic principles and techniques of design to improve the quality and efficiency of programming.

What is structured programming

The operating environment of this tutorial: Windows 10 system, Dell G3 computer.

What is structured programming? Structured programming is a programming methodology that aims to make programs clearer, easier to understand, and easier to maintain by dividing them into distinct modules and organizing these modules using control structures such as sequences, selections, and loops. .

Structured programming means taking a structured approach when writing a program, decomposing the program into smaller, relatively independent parts, and each part executes a specific tasks and communicated through clearly defined inputs and outputs.

The core idea of ​​this method is to decompose the programming task into a series of interrelated modules. Each module independently completes a function and interacts through interfaces. In this way, program maintenance and modification become relatively easy, because you only need to focus on making modifications on one module without considering the impact of the entire program. In addition, structured programming encourages developers to use clear and meaningful variable and function names to improve code readability.

Structured programming was first proposed in the late 1960s and early 1970s in response to the complexity of early programming languages ​​of the time, such as assembly language and Fortran. Subsequently, this method became widely used and was popularized by Edsger Dijkstra in the late 1970s.

Given a specific programming task, the steps of structured programming generally include the following aspects:

1. Analyze the problem: Carefully read and understand the requirements of the problem and determine the input and output of the program.

2. Design algorithm: Decompose the program into a series of functional modules and design a corresponding algorithm for each module.

3. Write pseudocode: Pseudocode is a description method that is similar to a programming language and is used to describe the logical structure and steps of an algorithm. Pseudocode should be concise and easy to understand.

4. Write code: Implement pseudo code in a specific programming language and code according to the designed module.

5. Testing and debugging: Test the program, debug it in actual operation, and fix potential errors in the program.

In short, structured programming is a programming methodology that makes programs clearer, easier to understand, and easier to maintain. By dividing a program into different modules and using control structures to organize these modules, structured programming makes the development and maintenance of programs more efficient and reliable. Whether you are a beginner or an experienced developer, you should master the basic principles and techniques of structured programming to improve the quality and efficiency of programming.

The above is the detailed content of What is structured programming. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!