学习日志—类型和声明—advice
来源:互联网 发布:多迪php培训 编辑:程序博客网 时间:2024/06/07 22:21
[1]Keep scopes small.
[2]Don't use the same name in both a scope and an enclosing scope.
[3]Declare one name (only) per declaration.
[4]Keep common and local names short, and uncommon and nolocal names longer;
[5]Avoid similar-looking names;
[6]Maintain a consistent naming style;
[7]Choose names carefully to reflect meaning rather than implementation;
[8]Use a typedef to define a meaningful name for a built-in type in case in which the built-in type used to represent a value might change;
[9]Remember that every declaration must specify a type (there is no "implicit int";
[10]Avoid unnecessary assumptions about the numeric value of characters;
[11]Avoid unnecessary assumptions about the size of integers;
[12]Avoid unnucessary assumptions about the range of floating-point types;
[13]Perfer a plain int over a short int or long int ;
[14]Perfer double over a float or long double;
[15]Perfer plain char over signed char and unsigned char;
[16]Avoid making unnecessary assumptions about the sizes of objects;
[17]Avoid unsigned arithmetic;
[18]View signed to unsigned and unsigned to signed conversions with suspicion;
[19]View floating-point to integer conversions with suspicion;
[20]View conversions to a smaller type,such as int to char ,with suspicion;
- 学习日志—类型和声明—advice
- 学习日志—advice
- 学习日志—类型和声明
- 学习日志—类型和声明—char
- 学习日志—类型和声明—float
- C++学习摘录(类型和声明)
- 《TC++PL》第四章笔记——类型和声明
- scala基础1 —— 声明和类型
- c——类型声明 类型定义
- Java 学习日志1.1 声明变量和常量。
- C++类型和声明
- [C++学习历程]基础部分 C++中的类型和声明
- CIL之——值类型与引用类型的声明和使用
- C++20171110日志 Static类型的声明
- Scala学习日志(1.5)——自适应类型
- C++学习笔记 类型声明
- 使用js-ctypes——声明类型
- C++ Tips: 类型和声明
- 各种浏览器css hack
- 事件标记关联优化模型实现
- Delphi中AdoTable通过Locate方法快速定位记录
- pku 1152 An Easy Problem!
- 尽人事,听天命
- 学习日志—类型和声明—advice
- 关于23种设计模式的有趣见解
- pku 1163
- C语言基础
- C#中使用JMail方法及出现报错
- sql server 查询语句积累
- face the terror
- windows 命令行下 简单好用的查看端口占用情况的方法
- Sicily 1210 二叉树(树的遍历)