In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces the meaning of structured programming in the computer, which is very detailed and has a certain reference value. Friends who are interested must read it!
The three basic structures are: 1, sequential structure, the operations in the program are executed according to the order in which they appear; 2, select the structure, there are branches in the processing steps of the program, it is necessary to select one of the branches to execute according to some specific conditions; 3, the loop structure, the program repeatedly performs some or some operations until some condition is false (or true).
Structured programming (structured programming) is the basic principle of detailed design based on module function and process design. Structured programming is a subset of procedural programming that uses logical structures for written programs, making it more effective and easier to understand and modify.
Structured programming adopts the design method of top-down and step-by-step refinement, and each module is connected by the control structure of "sequence, selection and loop", and there is only one entrance and one exit.
The principle of structured programming can be expressed as: program = (algorithm) + (data structure).
The algorithm is an independent whole, and the data structure (including data types and data) is also an independent whole. The two are designed separately, mainly based on algorithms (functions or procedures).
With the development of computer technology, software engineers pay more and more attention to the expression of the overall relationship of the system, so the data model technology (regarding the data structure and algorithm as an independent functional module) appears, which is the embryonic form of object-oriented programming.
There are three basic structures of structured programs: sequential structure, selective structure and loop structure.
1. Sequential structure
The sequential structure indicates that the operations in the program are performed in the order in which they appear. The characteristic of this structure is that the program starts from the entry point an and performs all the operations sequentially until the exit point b, so it is called the sequential structure.
2. Select the structure
The selection structure indicates that there is a branch in the processing step of the program, and it needs to select one of the branches to execute according to a specific condition. The selection structure can be divided into three forms: single selection, double selection and multi-selection.
3. Cycle structure
The loop structure means that the program repeatedly performs some operation or operations and can not terminate the loop until a condition is false (or true). The most important thing in the loop structure is: under what circumstances does the loop execute? What operations need to be performed in a loop? There are two basic forms of cycle structure: current cycle and straight-to-type cycle.
The current loop: it judges the condition first, executes the loop body when the given condition is met, and the process automatically returns to the loop entrance at the end of the loop; if the condition is not met, the exit loop body reaches the process exit directly. Because it is "execute the loop when the condition is met", that is, judge first and then execute, it is called the current loop.
Straight-to-type loop: it means that the loop body is executed directly from the entrance of the structure, and the condition is judged at the loop terminal. If the condition is not satisfied, the loop body continues to be executed at the entrance, and the loop is exited to the exit of the process until the condition is true. Execute first and then judge. Because it is "until the condition is true", it is called a straight-to-type loop.
The above is all the contents of the article "what does structured programming mean in a computer?" Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.