Programming Fundementals
by Thanawich Thorach
1. if
1.1. drawCircle(50); void drawCircle(int r){ ellipse(50,50,r,r); r=r+1 if(r>100){r=0; } }
2. User Defined Function:Local/Global Variables
2.1. Local
2.1.1. drawCircle(50); drawCircle(80); void drawCircle(int r){ ellipse(50,50,r,r); }
2.2. Global
2.2.1. int r=50; void draw(){ ellipse(50,50,r,r); }
3. Condition
3.1. else
4. Basic
4.1. ellipse(X,Y,x,y);
4.2. line(X1,Y1,X2,Y2);
5. Variable
5.1. int
5.2. float
6. Sequence of commands Variables
6.1. User Defined Variable
6.1.1. EX int r= 80; //radius ellipse(50,50,r,r);
6.2. System Variable
6.2.1. <สูง>height ... canvas (ความสุงของหน้าจอแสดง)
6.2.2. <กว้าง>width (ความกว้างของหน้าจอแสดง)
6.3. User Defined Function
6.3.1. drawCircle(); , void drawCiecle(){};