;pH&YBY
3P}^Wu
E8gbm&x*
1、"&"替换"+". 44r@8HO1
在很多人的编程语言中,用“+”来连接字符串,这样容易导致歧义。良好的习惯是用“&”来连接字符串. h
eR$j
不正确: 7A,QA5G]C
dim sMessage as string :NCY6?
[Dz
(B/od# nU
sMessage="1"+"2" !k5I#w :
<]w(1{q(
正确: }Cs.Hm0P
dim sMessage as string j:Y1
BdMmeM2h
sMessage="1" & "2" j Z6]G{
注意:"&"的后面有个空格. $T#yxx
F]qX}
2.变量命名大小写,语句错落有秩 b'5]o
下面大家比较一下以下两段代码: U07G&?/
读懂难度很大的代码: H
Z)an
dim SNAME as string >du _/*8:
dim NTURN as integer W]TO%x{
h=x{
3P;B
|0wHNRN_
if NTURN=0 then dv7IHUFf
if SNAME="sancy" then %C1*`"Jb&
end if B*
hW
Do while until NTURN=4
}Ghh%]
NTRUN=NTURN+1 )@hG #KMK
Loop IncHY?ud<