|
nbsp; --------; end;
{ 方法的目的 } 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] 下一页 [系统软件]InstallShield Express for delphi制作安装程序定… [系统软件](转帖) 忘记登录密码的解决方案 for XP/2003/2000 [系统软件]交叉编译sshd for IXP425 ARM Platform by MVL 3… [常用软件]Firefox 1.0 全方位试用 [常用软件]完全免费的国产语音ICQ软件----V2 Communicator 1… [Delphi程序]《关于VisiBroker For Delphi的使用》(4) [Delphi程序]一个超链接Image控件!(For D3,D4,D5,D6)源代码 [Delphi程序]Five of the best tools for Delphi [Delphi程序]《关于VisiBroker For Delphi的使用》(3) [Delphi程序]《关于VisiBroker For Delphi的使用》(2)
|