Comprofun

Get Started. It's Free
or sign up with your email address
Comprofun by Mind Map: Comprofun

1. Function

1.1. User define Function

1.1.1. ผู้ใช้กำหนดฟังก์ชันเอง

1.1.1.1. void drawCircle(){}

1.2. System define Function

1.2.1. ฟังก์ชันที่มีอยู่แล้ว เรียกใช้ได้เลย

1.2.1.1. void setup(){}

1.2.1.2. void draw(){}

1.3. วิธีใช้

1.3.1. ประกาศ

1.3.1.1. void drawCricle(){}

1.3.2. กำหนด

1.3.2.1. void drawCricle (){ ellipse(); }

1.3.3. เรียกใช้

1.4. ประเภทของ Function

1.4.1. ฟังก์ชันรับค่า ไม่ส่งค่ากลับ

1.4.1.1. void drawCircle(50);

1.4.2. ฟังก์ชันรับค่า และส่งค่ากลับ

1.4.2.1. int drawCircle(50);

1.4.3. ฟังก์ชันไม่รับค่า ไม่ส่งค่ากลับ

1.4.3.1. void drawCircle();

1.4.4. ฟังก์ชันไม่รับค่า แต่ส่งค่ากลับคืน

1.4.4.1. int drawCircle();

2. Basic function

2.1. ellipse();

2.2. rect();

2.3. strokeWeight();

2.4. stroke();

2.5. line();

2.6. fill();

2.7. background();

2.8. size();

2.9. noStroke();

3. Variable

3.1. User define Variable

3.1.1. ผู้ใช้ต้องประกาศใช้เอง

3.1.1.1. เช่น

3.1.1.1.1. int x= 10;

3.2. Global Variable

3.2.1. ตัวแปรที่ประกาศแล้วใช้ได้ทุกฟังก์ชัน

3.3. System define Variable

3.3.1. ไม่ต้องประกาศ มีให้ใช้ได้เลย

3.3.1.1. เช่น

3.3.1.1.1. mouseX,mouseY

3.4. Local Variable

3.4.1. ตัวแปรที่ใช้ได้เฉพาะในฟังก์ชันที่ประกาศ

3.5. วิธีใช้

3.5.1. ประกาศ

3.5.1.1. int x ;

3.5.2. กำหนด

3.5.2.1. x = 10;

3.5.3. เรียกใช้

3.5.3.1. line (x,10,5010);

4. Loop

4.1. function ที่ตรวจสอบเงื่อนไขก่อนทำ ทำแล้ว กลับมาตรวจสอบเงื่อนไขอีกครั้ง จนกว่าจะเป็นเท็จ จึงออกจาก loop

4.2. while(){}

5. Conditional

5.1. เงื่อนไขของฟังก์ชัน

5.1.1. ทำ/ไม่ทำ

5.2. ฟังก์ชันที่ทำตามเงื่อนไข แล้ววนกลับมาตรวจสอบเงื่อนไขอีก จนเป็นเท็จแล้วจึงออกจากฟังก์ชัน

5.3. if(){}