flash开发中的命名.docVIP

  • 9
  • 0
  • 约3.27千字
  • 约 4页
  • 2018-05-25 发布于河南
  • 举报
flash开发中的命名

1、违反:代码规范的目的是增加代码的可读性,便于程序的维护所有有利于代码可读性的违反都是被允许的 .左大括号须放置于组合语句开始的末尾。 If(loggedin()){ text.label=”Welcome’; }else{ Text.label=”Access”; } 2、命名规则使用含义丰富的名字(Use meaningful names) 在缩写中,只将首字母大写 如果一个类成员是由缩写开始,则该缩写全部使用小写字母,此约定不适用到常量 再说句废话,所有的名字都应该使用英文 3、包命名(package names Package names should be lower case 包的名字应全部为小写; 4、类命名(class names) Class neames should be nouns in singular form,written in mixed cases starting with upper case (类应该以名词单数形式,首字母大写,大小写混排,方式命名) Class representing collections should have names in plural form (表示一组事物的类应使用复数形成;) Names of exception classes should be prefixed with Error

文档评论(0)

1亿VIP精品文档

相关文档