📄 编码规范_vb.htm
字号:
<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=GB2312">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 9">
<meta name=Originator content="Microsoft Word 9">
<link rel=File-List href="./VB源代码编码约定.files/filelist.xml">
<title>VB源代码编码约定</title>
<!--[if gte mso 9]><xml>
<o:DocumentProperties>
<o:Author>firefox</o:Author>
<o:LastAuthor>firefox</o:LastAuthor>
<o:Revision>2</o:Revision>
<o:TotalTime>32</o:TotalTime>
<o:Created>2002-11-27T05:57:00Z</o:Created>
<o:LastSaved>2002-11-27T05:57:00Z</o:LastSaved>
<o:Pages>6</o:Pages>
<o:Words>2147</o:Words>
<o:Characters>4080</o:Characters>
<o:Company>MDM</o:Company>
<o:Lines>453</o:Lines>
<o:Paragraphs>163</o:Paragraphs>
<o:CharactersWithSpaces>15031</o:CharactersWithSpaces>
<o:Version>9.2812</o:Version>
</o:DocumentProperties>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:PunctuationKerning/>
<w:DrawingGridHorizontalSpacing>5.25 磅</w:DrawingGridHorizontalSpacing>
<w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery>
<w:DisplayVerticalDrawingGridEvery>2</w:DisplayVerticalDrawingGridEvery>
<w:Compatibility>
<w:SpaceForUL/>
<w:BalanceSingleByteDoubleByteWidth/>
<w:DoNotLeaveBackslashAlone/>
<w:ULTrailSpace/>
<w:DoNotExpandShiftReturn/>
<w:AdjustLineHeightInTable/>
<w:UseFELayout/>
</w:Compatibility>
</w:WordDocument>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:宋体;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"\@宋体";
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"\000B";
panose-1:0 0 0 0 0 0 0 0 0 0;
mso-font-alt:"Times New Roman";
mso-font-charset:0;
mso-generic-font-family:roman;
mso-font-format:other;
mso-font-pitch:auto;
mso-font-signature:0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin-top:.5gd;
margin-right:0cm;
margin-bottom:.5gd;
margin-left:0cm;
text-align:justify;
text-justify:inter-ideograph;
mso-pagination:none;
font-size:10.5pt;
mso-bidi-font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:宋体;
mso-font-kerning:1.0pt;}
h1
{mso-style-next:正文;
margin-top:.5gd;
margin-right:0cm;
margin-bottom:.5gd;
margin-left:0cm;
text-align:justify;
text-justify:inter-ideograph;
line-height:240%;
mso-pagination:lines-together;
page-break-after:avoid;
mso-outline-level:1;
font-size:22.0pt;
font-family:"Times New Roman";
mso-font-kerning:22.0pt;}
h3
{mso-style-next:正文;
margin-top:.5gd;
margin-right:0cm;
margin-bottom:.5gd;
margin-left:0cm;
text-align:justify;
text-justify:inter-ideograph;
line-height:173%;
mso-pagination:lines-together;
page-break-after:avoid;
mso-outline-level:3;
font-size:16.0pt;
font-family:"Times New Roman";
mso-font-kerning:1.0pt;}
/* Page Definitions */
@page
{mso-page-border-surround-header:no;
mso-page-border-surround-footer:no;}
@page Section1
{size:595.3pt 841.9pt;
margin:72.0pt 55.3pt 72.0pt 63.0pt;
mso-header-margin:35.45pt;
mso-footer-margin:35.45pt;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=ZH-CN style='tab-interval:21.0pt;text-justify-trim:punctuation'>
<div class=Section1>
<h1 style='margin-top:6.0pt;margin-right:0cm;margin-bottom:6.0pt;margin-left:
0cm'><span lang=EN-US>VB</span><span style='font-family:宋体;mso-ascii-font-family:
"Times New Roman";mso-hansi-font-family:"Times New Roman"'>源代码编码约定</span></h1>
<h3 style='margin-top:6.0pt;margin-right:0cm;margin-bottom:6.0pt;margin-left:
0cm'><span lang=EN-US><br>
1 </span><span style='font-family:宋体;mso-ascii-font-family:
"Times New Roman";mso-hansi-font-family:"Times New Roman"'>为什么要进行编码约定?</span></h3>
<p class=MsoNormal style='margin-top:6.0pt;margin-right:0cm;margin-bottom:6.0pt;
margin-left:0cm'><span style='font-size:9.0pt;font-family:宋体;mso-ascii-font-family:
"\000B";mso-hansi-font-family:"\000B";color:black'>使用统一编码约定集的主要原因,是使应用程序的结构和编码风格标准化,以便于阅读和理解这段编码。</span><span
lang=EN-US style='font-size:9.0pt;font-family:"\000B";color:black'><br>
<br>
</span><span style='font-size:9.0pt;font-family:宋体;mso-ascii-font-family:"\000B";
mso-hansi-font-family:"\000B";color:black'>好的编码约定可使源代码严谨、可读性强且意义清楚,与其它语言约定相一致,并且尽可能的直观。</span><span
lang=EN-US style='font-size:9.0pt;font-family:"\000B";color:black'><br
style='mso-special-character:line-break'>
<![if !supportLineBreakNewLine]><br style='mso-special-character:line-break'>
<![endif]><o:p></o:p></span></p>
<h3 style='margin-top:6.0pt;margin-right:0cm;margin-bottom:6.0pt;margin-left:
0cm'><span lang=EN-US>2 </span><span style='font-family:
宋体;mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman"'>最小编码约定</span></h3>
<p class=MsoNormal style='margin-top:6.0pt;margin-right:0cm;margin-bottom:6.0pt;
margin-left:0cm'><span style='font-size:9.0pt;font-family:宋体;mso-ascii-font-family:
"\000B";mso-hansi-font-family:"\000B";color:black'>一组通用目的的编码约定应该定义完成上述目的所必需的、能让程序员自由地创建程序逻辑和功能流程的最小的要求。</span><span
lang=EN-US style='font-size:9.0pt;font-family:"\000B";color:black'><br>
<br>
</span><span style='font-size:9.0pt;font-family:宋体;mso-ascii-font-family:"\000B";
mso-hansi-font-family:"\000B";color:black'>最小编码约定的目的是使程序易于阅读和理解,而不是用过份的约束和绝对的限制来束缚程序员本身的创造性。</span><span
lang=EN-US style='font-size:9.0pt;font-family:"\000B";color:black'><br>
<br>
</span><span style='font-size:9.0pt;font-family:宋体;mso-ascii-font-family:"\000B";
mso-hansi-font-family:"\000B";color:black'>所以,该附录中提出的约定是简洁和建意性的。这些约定中没列出每一个可能的对象或控件,也没列出每种有用的信息注释。根据工程及机构的特殊要求,也许希望扩充这些准则,以包含附加的元素,如:</span><span
lang=EN-US style='font-size:9.0pt;font-family:"\000B";color:black'> <br>
<br>
</span><span style='font-size:9.0pt;font-family:宋体;mso-ascii-font-family:"\000B";
mso-hansi-font-family:"\000B";color:black'>对于在家庭中开发的或从第三方厂商购买的特定对象及组件的约定。</span><span
lang=EN-US style='font-size:9.0pt;font-family:"\000B";color:black'><br>
<br>
</span><span style='font-size:9.0pt;font-family:宋体;mso-ascii-font-family:"\000B";
mso-hansi-font-family:"\000B";color:black'>描述机构的商业活动或设备的变量。</span><span
lang=EN-US style='font-size:9.0pt;font-family:"\000B";color:black'><br>
<br>
</span><span style='font-size:9.0pt;font-family:宋体;mso-ascii-font-family:"\000B";
mso-hansi-font-family:"\000B";color:black'>工程或企业认为对清楚性和可读性很重要的任何其它元素。</span><span
lang=EN-US style='font-size:9.0pt;font-family:"\000B";color:black'> <br
style='mso-special-character:line-break'>
<![if !supportLineBreakNewLine]><br style='mso-special-character:line-break'>
<![endif]><o:p></o:p></span></p>
<h3 style='margin-top:6.0pt;margin-right:0cm;margin-bottom:6.0pt;margin-left:
0cm'><span lang=EN-US>3 </span><span style='font-family:
宋体;mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Roman"'>对象命名约定</span></h3>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -