Guest:
Register
|
Login
|
Member List
|
Search
|
Statistics
|
FAQ
Language
----------
Simplifed Chinese
Traditional Chinese
English
CnPack Forum
»
CnPack IDE 专家包(CnWizards)
» Delphi编码规范.htm文字错误
‹‹ Last Thread
|
Next Thread ››
Poll
Trade
Reward
Activity
Printable Version
|
Email to Friend
|
Subscription
|
Favorites
Subject: Delphi编码规范.htm文字错误
Icebird
新警察
UID 189
Digest Posts 0
Credits 15
Posts 15
点点分 15
Reading Access 10
Registered 2003-10-20
Location chengdu
Status Offline
#1
Post at 2003-10-23 14:51
Profile
|
Blog
|
P.M.
Delphi编码规范.htm文字错误
另外cnpack\Doc\Templates\Delphi编码规范.htm中有点小错误 :
(1) 格式
只要可能,同一类型的形参应当归并在一起:
procedure Foo(Param1,Param2,Param3:
Imteger
;Param4:string);
Icebird
新警察
UID 189
Digest Posts 0
Credits 15
Posts 15
点点分 15
Reading Access 10
Registered 2003-10-20
Location chengdu
Status Offline
#2
Post at 2003-10-23 14:55
Profile
|
Blog
|
P.M.
(2) Uses 子句
Interface部分的Uses子句应当只包含该部分需要的单元。
不要包含可能由Delphi自动添加的单元名。
Implementation部分的Uses子句应当只包含该部分需要的单元,不要有多余的单元。
这段话怎么看着有点不对劲?
zjy
管理员
UID 2
Digest Posts
6
Credits 2385
Posts 1543
点点分 2385
Reading Access 102
Registered 2002-12-16
Location China
Status Offline
#3
Post at 2003-10-23 17:01
Profile
|
Site
|
Blog
|
P.M.
(1)格式部分已更正。
(2)Uses子句,我想原文的意思是,interface 部分的 uses 子句只应该包含 interface 部分的声明所用到的外部单元引用。象 Controls, Forms, Dialogs, 这样的单元,如果在不带窗体并用不到这些单元的 Unit 里应该不使用。Implementation 部分也一样,避免编译无用的单元。
Zhou JingYu
CnPack Administrator
http://www.cnpack.org/
Icebird
新警察
UID 189
Digest Posts 0
Credits 15
Posts 15
点点分 15
Reading Access 10
Registered 2003-10-20
Location chengdu
Status Offline
#4
Post at 2003-10-23 17:38
Profile
|
Blog
|
P.M.
如果是针对有窗体的单元,上面的说法就有点问题,当然针对纯粹的单元就没有问题。
我的理解是当在窗体上放置控件时,Delphi就会自动添加相关的单元,而且一定要放在Interface中
[ 本贴由 Icebird 于 2003-10-23 17:42 最后编辑 ]
Poll
Trade
Reward
Activity
CnPack Forum
CnPack English Forum
> CnWizards IDE Wizards
> CVSTracNT
> Announcements & Others
All times are GMT++8, the time now is 2024-11-22 07:01
Powered by
Discuz!
5.0.0
© 2001-2006
Comsenz Inc.
Processed in 0.008541 second(s), 8 queries , Gzip enabled
TOP
Clear Cookies
-
Contact Us
-
CnPack Website
-
Archiver
-
WAP
Member's CP Home
Edit Profile
Credits Transaction
Public User Groups
Buddy List
Main
Page Views
User Agents
Posts History
Top Forums
Top Threads
Post Ranking
Credit Ranking
Online Time
Team
Moderation Stats