Friday, December 12, 2014

Post tittle: Flowchart

รูปแบบตามลําดับ


เป็นรูปแบบการเขียนโปรแกรมที่ง่ายที่สุด ทํางานทีละอย่างจากบนลง
ล่าง แสดงลําดับการทํางานจากบนลงล่างตามลูกศร
แบบการเลือก

เป็นการเขียนโปรแกรมแบบมีการเปรียบเทียบเงื่อนไข และทํางานตาม
คําสั่งอย่างใดอย่างหนึ่งตามเงื่อนไขที่กําหนด ผลจากการเปรียบเทียบ
เงื่อนไข จะให้ผลลัพธ์เป็นจริงหรือเท็จ ถ้าผลเป็นจริง ให้ทํางานตาม
คําสั่งด้านที่เงื่อนไขเป็นจริง ถ้าเป็นเท็จให้ทําตามคําสั่งด้านที่เงื่อนไข
เป็นเท็จ
• แบบทางเลือกเดียว (IF - THEN)
• แบบสองทางเลือก (IF – THEN - ELSE)
• แบบหลายทางเลือก (IF – THEN – ELSE IF | CASE)

แบบสองทางเลือก
การเลือกหลายทาง
• เป็นรูปแบบการเลือกการทํางานที่มีทางเลือกมากกว่า 2 ทางขึ้นไป 


แบบวนซั้า
• แบบกําหนดรอบไว้ล่วงหน้า(Controlled Loop)
• แบบตรวจสอบเงื่อนไขก่อน( Pre -Test Condition)
• แบบตรวจสอบเงื่อนไขทีหลัง(Post-Test
Condition)
แบบกําหนดรอบการทํางานเอาไว้ล่วงหน้า
• มีการกําหนดรอบการทํางานซ้าไว้ล่วงหน้า เมื่อครบตามจํานวนรอบจึง
หยุดทํางานซ้าแล้วทําคําสั่งต่อไป


แบบตรวจสอบเงื่อนไขก่อนถ้าเป็นจริงแล้วค่อยทําซํ้า
• แบบตรวจสอบเงื่อนไขก่อน ถ้าเงื่อนไขยังเป็นจริงให้ทํางานซํ้า จนกระทั่ง
เงื่อนไขเป็นเท็จจึงหยุดทํางานซํ้า แล้วไปทํางานคําสั่งอื่นถัดไป


แบบทํ้าซํ้าก่อนแล้วค่อยตรวจเงื่อนไข
• แบบให้ทํางานในคําสั่งทําซํ้าก่อน แล้วค่อย ตรวจสอบเงื่อนไข ถ้าเงื่อนไขยังเป็นเท็จให้
กลับไปทํางานในคําสั่งทําซํ้าอีก จนกระทั่ง ตรวจสอบแล้วเงื่อนเป็นจริง จึงหยุด แล้วไปทํางานคําสั่งอื่น


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. 

If your charts are all sequences, then you probably don't need to draw a flowchart. You can type a simple list using your word processor. The power of a flowchart becomes evident when you include decisions and loops.  

RFFlow allows you to number your shapes if you wish. Run RFFlow and click on ToolsNumber Shapes, and put a check mark in Enable numbers for the entire chart. You can also choose to have a number or not in each individual shape and you can quickly renumber your chart at any time.




Decision

his 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.


Loop
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. A slight variation of the above is the "For each...do the following" loop shown below














































Sunday, November 23, 2014

Name : Ravipol Srisangnum
Age : 14
Address : Bangkok
Birthday : 13 August 2000
Hobbies : ride a bicycle,play game and play piano














Hi my nickname is PIP. I study at Assumption College.