{ 方法的目的 } function ----------------------------- begin --------; --------; end;
5、过程与函数
命名 格式
返回
3、语句风格
1、简单语句 -------; 2、复合语句 begin -----; -----; end;
3、赋值语句 -- := -------; -- := (-- + --)* (-- / --);
4、局部变量 var ---: ---; ---: ---; 对于逻辑上并列的变量组: var ---, ---, ---: ---;
5、数组声明 --- = array [*..*] of ---;
6、if 语句 if (--------) then -------------;
if (--------) then begin -------------; -------------; -------------; end;
if (--------) then -------------; else -------------;
if (--------) then begin -------------; -------------; -------------; end else -------------;
if (--------) then begin -------------; -------------; -------------; end else begin -------------; -------------; -------------; end;
if (--------) then ------------- else if (--------) then -------------;
7、for 循环
for I := -------- to -------- do -------------;
for I := -------- to -------- do begin -------------; -------------; -------------; end;
for I := -------- to -------- do if (--------) then begin -------------; -------------; -------------; end;
for I := -------- to -------- do with -------- then begin -------------; -------------; -------------; end;
8、while 循环
while ------ do begin -------------; -------------; -------------; end;
9、repeat 循环 repeat -------------; -------------; -------------; until ------;
10、case 语句
case -------- of -------- : -------------; -------- : -------------; -------- : -------------; else -------------; end;
case -------- of -------- : -----------------------------------------------------------------; -------- : -----------------------------------------------------------------; -------- : -----------------------------------------------------------------; else -----------------------------------------------------------------; end;
case -------- of -------- : begin --------------------------; --------------------------; --------------------------; end; -------- : begin --------------------------; --------------------------; --------------------------; end; -------- : begin --------------------------; --------------------------; --------------------------; end else begin -------------; -------------; -------------; end;
end;
11、with 语句
with -------- do -------------;
with -------- do begin -------------; -------------; -------------; end;
12、try 语句
try -------------; -------------; -------------; finally -------------; -------------; -------------; end;
try try -------------; -------------; -------------; except -------------; -------------; end; finally -------------; -------------; -------------; end;
13、其它
运算:运算符前后要有空格 w1[n] := ((i + 1) * v0[n] + j * v1[n] + (k - 1) * v2[n]) / depth;
-- = -- -- >= -- -- <= -- -- > -- -- < -- -- <> -- -- := --; 赋值 --: ----; 类型
同一类型且含义逻辑上不并列的变量 20个字符长的变量名 private ------- : -------; ------- : -------; ------- : -------; & 上一页 [1] [2] [3] [4] 下一页 |