📄 sec2-3.htm
字号:
lang=EN-US style='font-size:12.0pt;font-family:宋体'>1<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:49.55pt;mso-para-margin-left:4.72gd;
text-indent:24.0pt;mso-char-indent-count:2.0;line-height:15.0pt;mso-line-height-rule:
exactly'><span lang=EN-US style='font-size:12.0pt;font-family:宋体'>ELSE<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:49.55pt;mso-para-margin-left:4.72gd;
text-indent:49.7pt;mso-char-indent-count:4.14;line-height:15.0pt;mso-line-height-rule:
exactly'><span lang=ZH-CN style='font-size:12.0pt;font-family:宋体'>块</span><span
lang=EN-US style='font-size:12.0pt;font-family:宋体'>2<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:49.55pt;mso-para-margin-left:4.72gd;
text-indent:24.0pt;mso-char-indent-count:2.0;line-height:15.0pt;mso-line-height-rule:
exactly'><span lang=EN-US style='font-size:12.0pt;font-family:宋体'>END IF<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:26.25pt;mso-para-margin-left:2.5gd;
text-indent:24.0pt;mso-char-indent-count:2.0;line-height:17.0pt;mso-line-height-rule:
exactly'><span lang=ZH-CN style='font-size:12.0pt;font-family:宋体'>则</span><span
lang=EN-US style='font-size:12.0pt;font-family:宋体'>e</span><span lang=ZH-CN
style='font-size:12.0pt;font-family:宋体'>真执行块</span><span lang=EN-US
style='font-size:12.0pt;font-family:宋体'>1</span><span lang=ZH-CN
style='font-size:12.0pt;font-family:宋体'>,假执行块</span><span lang=EN-US
style='font-size:12.0pt;font-family:宋体'>2</span><span lang=ZH-CN
style='font-size:12.0pt;font-family:宋体'>。</span><span lang=EN-US
style='font-size:12.0pt;font-family:宋体'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:26.25pt;mso-para-margin-left:2.5gd;
text-indent:24.0pt;mso-char-indent-count:2.0;line-height:17.0pt;mso-line-height-rule:
exactly'><span lang=ZH-CN style='font-size:12.0pt;font-family:宋体'>如果保留</span><span
lang=EN-US style='font-size:12.0pt;font-family:宋体'>ELSE IF</span><span
lang=ZH-CN style='font-size:12.0pt;font-family:宋体'>语句,缺省下面块:</span><span
lang=EN-US style='font-size:12.0pt;font-family:宋体'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:49.55pt;mso-para-margin-left:4.72gd;
text-indent:24.0pt;mso-char-indent-count:2.0;line-height:15.0pt;mso-line-height-rule:
exactly'><span lang=EN-US style='font-size:12.0pt;font-family:宋体'>IF(e<sub>1</sub>)
THEN<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:49.55pt;mso-para-margin-left:4.72gd;
text-indent:49.7pt;mso-char-indent-count:4.14;line-height:15.0pt;mso-line-height-rule:
exactly'><span lang=ZH-CN style='font-size:12.0pt;font-family:宋体'>块</span><span
lang=EN-US style='font-size:12.0pt;font-family:宋体'>1<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:49.55pt;mso-para-margin-left:4.72gd;
text-indent:24.0pt;mso-char-indent-count:2.0;line-height:15.0pt;mso-line-height-rule:
exactly'><span lang=EN-US style='font-size:12.0pt;font-family:宋体'>ELSEIF(e<sub>2</sub>)
THEN<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:49.55pt;mso-para-margin-left:4.72gd;
text-indent:24.0pt;mso-char-indent-count:2.0;line-height:15.0pt;mso-line-height-rule:
exactly'><span lang=EN-US style='font-size:12.0pt;font-family:宋体'>ELSE<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:49.55pt;mso-para-margin-left:4.72gd;
text-indent:49.7pt;mso-char-indent-count:4.14;line-height:15.0pt;mso-line-height-rule:
exactly'><span lang=ZH-CN style='font-size:12.0pt;font-family:宋体'>块</span><span
lang=EN-US style='font-size:12.0pt;font-family:宋体'>2<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:49.55pt;mso-para-margin-left:4.72gd;
text-indent:24.0pt;mso-char-indent-count:2.0;line-height:15.0pt;mso-line-height-rule:
exactly'><span lang=EN-US style='font-size:12.0pt;font-family:宋体'>END IF<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:26.25pt;mso-para-margin-left:2.5gd;
text-indent:24.0pt;mso-char-indent-count:2.0;line-height:17.0pt;mso-line-height-rule:
exactly'><span lang=ZH-CN style='font-size:12.0pt;font-family:宋体'>则</span><span
lang=EN-US style='font-size:12.0pt;font-family:宋体'>e<sub>1</sub></span><span
lang=ZH-CN style='font-size:12.0pt;font-family:宋体'>真执行块</span><span lang=EN-US
style='font-size:12.0pt;font-family:宋体'>1</span><span lang=ZH-CN
style='font-size:12.0pt;font-family:宋体'>,</span><span lang=EN-US
style='font-size:12.0pt;font-family:宋体'>e<sub>1</sub></span><span lang=ZH-CN
style='font-size:12.0pt;font-family:宋体'>假、但</span><span lang=EN-US
style='font-size:12.0pt;font-family:宋体'>e<sub>2</sub></span><span lang=ZH-CN
style='font-size:12.0pt;font-family:宋体'>真时不作任何操作,转出口,</span><span lang=EN-US
style='font-size:12.0pt;font-family:宋体'>e<sub>1</sub></span><span lang=ZH-CN
style='font-size:12.0pt;font-family:宋体'>和</span><span lang=EN-US
style='font-size:12.0pt;font-family:宋体'>e<sub>2</sub></span><span lang=ZH-CN
style='font-size:12.0pt;font-family:宋体'>都假时,执行语句块</span><span lang=EN-US
style='font-size:12.0pt;font-family:宋体'>2</span><span lang=ZH-CN
style='font-size:12.0pt;font-family:宋体'>。</span><span lang=EN-US
style='font-size:12.0pt;font-family:宋体'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:49.65pt;text-indent:-24.0pt;line-height:
17.0pt;mso-line-height-rule:exactly;mso-list:l0 level1 lfo2;tab-stops:list 49.65pt 72.0pt'><![if !supportLists]><span
lang=EN-US style='font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
Symbol;mso-bidi-font-family:Symbol'><span style='mso-list:Ignore'><img
width=13 height=13 src="Sec2-3.files/image001.gif" alt="*"><span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span lang=ZH-CN style='font-size:12.0pt;
font-family:宋体;color:purple'>缺省</span><span lang=EN-US style='font-size:12.0pt;
font-family:宋体;color:purple'>else</span><span lang=ZH-CN style='font-size:12.0pt;
font-family:宋体;color:purple'>块</span><span lang=EN-US style='font-size:12.0pt;
font-family:宋体;color:purple'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:49.55pt;mso-para-margin-left:4.72gd;
text-indent:24.0pt;mso-char-indent-count:2.0;line-height:15.0pt;mso-line-height-rule:
exactly'><span lang=EN-US style='font-size:12.0pt;font-family:宋体'>IF(e<sub>1</sub>)
THEN<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:49.55pt;mso-para-margin-left:4.72gd;
text-indent:49.7pt;mso-char-indent-count:4.14;line-height:15.0pt;mso-line-height-rule:
exactly'><span lang=ZH-CN style='font-size:12.0pt;font-family:宋体'>块</span><span
lang=EN-US style='font-size:12.0pt;font-family:宋体'>1<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:49.55pt;mso-para-margin-left:4.72gd;
text-indent:24.0pt;mso-char-indent-count:2.0;line-height:15.0pt;mso-line-height-rule:
exactly'><span lang=EN-US style='font-size:12.0pt;font-family:宋体'>ELSEIF(e<sub>2</sub>)
THEN<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:49.55pt;mso-para-margin-left:4.72gd;
text-indent:49.7pt;mso-char-indent-count:4.14;line-height:15.0pt;mso-line-height-rule:
exactly'><span lang=ZH-CN style='font-size:12.0pt;font-family:宋体'>块</span><span
lang=EN-US style='font-size:12.0pt;font-family:宋体'>2<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:49.55pt;mso-para-margin-left:4.72gd;
text-indent:24.0pt;mso-char-indent-count:2.0;line-height:15.0pt;mso-line-height-rule:
exactly'><span lang=EN-US style='font-size:12.0pt;font-family:宋体'>END IF<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:26.25pt;mso-para-margin-left:2.5gd;
text-indent:24.0pt;mso-char-indent-count:2.0;line-height:17.0pt;mso-line-height-rule:
exactly'><span lang=ZH-CN style='font-size:12.0pt;font-family:宋体'>则</span><span
lang=EN-US style='font-size:12.0pt;font-family:宋体'>e<sub>1</sub></span><span
lang=ZH-CN style='font-size:12.0pt;font-family:宋体'>真执行块</span><span lang=EN-US
style='font-size:12.0pt;font-family:宋体'>1</span><span lang=ZH-CN
style='font-size:12.0pt;font-family:宋体'>,</span><span lang=EN-US
style='font-size:12.0pt;font-family:宋体'>e<sub>1</sub></span><span lang=ZH-CN
style='font-size:12.0pt;font-family:宋体'>假、但</span><span lang=EN-US
style='font-size:12.0pt;font-family:宋体'>e<sub>2</sub></span><span lang=ZH-CN
style='font-size:12.0pt;font-family:宋体'>真语句块</span><span lang=EN-US
style='font-size:12.0pt;font-family:宋体'>2</span><span lang=ZH-CN
style='font-size:12.0pt;font-family:宋体'>,</span><span lang=EN-US
style='font-size:12.0pt;font-family:宋体'>e<sub>1</sub></span><span lang=ZH-CN
style='font-size:12.0pt;font-family:宋体'>和</span><span lang=EN-US
style='font-size:12.0pt;font-family:宋体'>e<sub>2</sub></span><span lang=ZH-CN
style='font-size:12.0pt;font-family:宋体'>都假时不作任何操作。</span><span lang=EN-US
style='font-size:12.0pt;font-family:宋体'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:49.65pt;text-indent:-24.0pt;line-height:
17.0pt;mso-line-height-rule:exactly;mso-list:l0 level1 lfo2;tab-stops:list 49.65pt 72.0pt'><![if !supportLists]><span
lang=EN-US style='font-size:12.0pt;font-family:Symbol;mso-fareast-font-family:
Symbol;mso-bidi-font-family:Symbol'><span style='mso-list:Ignore'><img
width=13 height=13 src="Sec2-3.files/image001.gif" alt="*"><span
style='font:7.0pt "Times New Roman"'>
</span></span></span><![endif]><span lang=ZH-CN style='font-size:12.0pt;
font-family:宋体;color:purple'>缺省</span><span lang=EN-US style='font-size:12.0pt;
font-family:宋体;color:purple'>then</span><span lang=ZH-CN style='font-size:12.0pt;
font-family:宋体;color:purple'>块</span><span lang=EN-US style='font-size:12.0pt;
font-family:宋体;color:purple'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:26.25pt;mso-para-margin-left:2.5gd;
text-indent:24.0pt;mso-char-indent-count:2.0;line-height:17.0pt;mso-line-height-rule:
exactly'><span lang=EN-US style='font-size:12.0pt;font-family:宋体'>IF THEN</span><span
lang=ZH-CN style='font-size:12.0pt;font-family:宋体'>语句必须有,但后随的块可以缺省:</span><span
lang=EN-US style='font-size:12.0pt;font-family:宋体'><o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:49.55pt;mso-para-margin-left:4.72gd;
text-indent:24.0pt;mso-char-indent-count:2.0;line-height:15.0pt;mso-line-height-rule:
exactly'><span lang=EN-US style='font-size:12.0pt;font-family:宋体'>IF(e<sub>1</sub>)
THEN<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:49.55pt;mso-para-margin-left:4.72gd;
text-indent:24.0pt;mso-char-indent-count:2.0;line-height:15.0pt;mso-line-height-rule:
exactly'><span lang=EN-US style='font-size:12.0pt;font-family:宋体'>ELSEIF(e<sub>2</sub>)
THEN<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:49.55pt;mso-para-margin-left:4.72gd;
text-indent:49.7pt;mso-char-indent-count:4.14;line-height:15.0pt;mso-line-height-rule:
exactly'><span lang=ZH-CN style='font-size:12.0pt;font-family:宋体'>块</span><span
lang=EN-US style='font-size:12.0pt;font-family:宋体'>2<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:49.55pt;mso-para-margin-left:4.72gd;
text-indent:24.0pt;mso-char-indent-count:2.0;line-height:15.0pt;mso-line-height-rule:
exactly'><span lang=EN-US style='font-size:12.0pt;font-family:宋体'>ELSE<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:49.55pt;mso-para-margin-left:4.72gd;
text-indent:49.7pt;mso-char-indent-count:4.14;line-height:15.0pt;mso-line-height-rule:
exactly'><span lang=ZH-CN style='font-size:12.0pt;font-family:宋体'>块</span><span
lang=EN-US style='font-size:12.0pt;font-family:宋体'>n+1<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:49.55pt;mso-para-margin-left:4.72gd;
text-indent:24.0pt;mso-char-indent-count:2.0;line-height:15.0pt;mso-line-height-rule:
exactly'><span lang=EN-US style='font-size:12.0pt;font-family:宋体'>END IF<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:26.25pt;mso-para-margin-left:2.5gd;
text-indent:24.0pt;mso-char-indent-count:2.0;line-height:17.0pt;mso-line-height-rule:
exactly'><span lang=ZH-CN style='font-size:12.0pt;font-family:宋体'>则</span><span
lang=EN-US style='font-size:12.0pt;font-family:宋体'>e<sub>1</sub></span><span
lang=ZH-CN style='font-size:12.0pt;font-family:宋体'>真时,整个构造等于空设,什么也不执行。只有当</span><span
lang=EN-US style='font-size:12.0pt;font-family:宋体'>e<sub>1</sub></span><span
lang=ZH-CN style='font-size:12.0pt;font-family:宋体'>为假时,才会一块块检查下去。</span><span
lang=EN-US style='font-size:12.0pt;font-family:宋体'><o:p></o:p></span></p>
<p><a name="第2_3_1e"><span lang=EN-US style='font-family:宋体;color:red'>e)</span></a><span
lang=EN-US style='font-family:宋体;color:red'> IF</span><span lang=ZH-CN
style='font-family:宋体;color:red'>构造的嵌套</span><span lang=EN-US style='font-family:
宋体;color:red'><o:p></o:p></span></p>
<p class=MsoNormal style='text-indent:24.0pt;mso-char-indent-count:2.0;
line-height:17.0pt;mso-line-height-rule:exactly;mso-char-indent-size:12pt'><span
lang=EN-US style='font-size:12.0pt;font-family:宋体'>IF</span><span lang=ZH-CN
style='font-size:12.0pt;font-family:宋体'>构造的任一语句块中(</span><span lang=EN-US
style='font-size:12.0pt;font-family:宋体'>then</span><span lang=ZH-CN
style='font-size:12.0pt;font-family:宋体'>块、</span><span lang=EN-US
style='font-size:12.0pt;font-family:宋体'>else if</span><span lang=ZH-CN
style='font-size:12.0pt;font-family:宋体'>块、</span><span lang=EN-US
style='font-size:12.0pt;font-family:宋体'>else</span><span lang=ZH-CN
style='font-size:12.0pt;font-family:宋体'>块)都可以嵌入另一个构造,被嵌入的构造可以是另一</span><span
lang=EN-US style='font-size:12.0pt;font-family:宋体'>IF</span><span lang=ZH-CN
style='font-size:12.0pt;font-family:宋体'>构造,也可以是另一些形态、功能不同的构造,如</span><span
lang=EN-US style='font-size:12.0pt;font-family:宋体'>CASE</span><span lang=ZH-CN
style='font-size:12.0pt;font-family:宋体'>构造、</span><span lang=EN-US
style='font-size:12.0pt;font-family:宋体'>DO</span><span lang=ZH-CN
style='font-size:12.0pt;font-family:宋体'>构造,前提是必须把整个构造完整
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -