1. รูปแบบ Sequence -

- แบบลำดับ ส่วนใหญ่จะเป็นการทำงานแบบจากซ้ายไปขวา หรือ บนลงล่าง โดยการทำงานจะมีผลแบบเดียว ตลอดการทำงาน
- The flowchart above demonstrates a sequence of steps. The reader would start at the Start shape and follow the arrows from one rectangle to the other, finishing at the End shape. A sequence is the simplest flowcharting construction. You do each step in order.
2. รูปแบบ Decision -

- แบบการเลือก เป็นแบบสำหรับการตัดสินใจเลือกว่าจะไปทำอะไรต่อไปในอัลกอริธึม ทำให้การทำงานจะมีผล หลายแบบมากขึ้น
- This structure is called a decision, "If Then.. Else" or a conditional. A question is asked in the decision shape. Depending on the answer the control follows either of two paths. In the chart above, if the temperature is going to be less than freezing (32 degrees Fahrenheit) the tomatoes should be covered. Most RFFlow stencils include the words "Yes" and "No" so you can just drag them onto your chart. "True" and "False" are also included in most of the flowcharting stencils.
- แบบการทำซ้ำหรือลูป ซึ่งพบได้เสมอในเกือบทุก อัลกอริธึม
เพื่อวนลูปทำงานอย่างหนึ่งอย่างใดให้ สำเร็จ การวนลูปจะมีสองแบบ คือ
การวนลูปแบบทราบจำนวนรอบแน่นอน (เช่น For..Next) กับอีกแบบหนึ่งคือไม่ทราบจำนวนรอบที่แน่นอน
- This
structure allows you to repeat a task over and over. The red chart above on the
left does the task and repeats doing the task until the condition is
true. The green chart on the right checks the condition first and does
the task while the condition is true. It is not important that you remember
whether the loop is a "Do While" or "Repeat Until" loop,
only that you can check the condition at the start of the loop or at the end.
You can also have the conditions reversed and your loop is still a structured
design loop.

ไม่มีความคิดเห็น:
แสดงความคิดเห็น