知識點5:神奇數字(magic number)
watch out! Don't put a semicolon at the end of your #defines.
You'll notice here also that I frequently #define all my defined symbolic constants, so to speak, are always in all caps.
It's a convention. It's not required.
The reason generally people will use all capitals when they're #defining is just to make it really clear that this particular element of my code is a defined constant. If it was lowercase, it's possible that it might be confused with a variable. And that's probably not a good thing to do.
相關文章
- 浮點數小知識點
- Python Number(數字)Python
- (5)FIFO知識點總結
- 拼接數字(知識點:string的使用和sort的cmp)
- Bad magic number for central directory
- HTML5知識點總結HTML
- FPGA數碼管知識點整理FPGA
- HTML5知識點總結(一)HTML
- 前端知識點總結——H5前端H5
- 知識點
- html及html5知識點總結HTML
- ASP.NET MVC5 知識點整理ASP.NETMVC
- 世界是數字的重點讀書筆記(計算機科普知識)筆記計算機
- HTML input number 數字控制元件HTML控制元件
- 關於Python Number 相關的知識!Python
- 整理Java基礎知識--Number&Math類Java
- 知識圖譜丨知識圖譜賦能企業數字化轉型
- HTML5學習重點知識:JavaScript概述HTMLJavaScript
- 資料庫知識點(5)——多列過濾資料庫
- 5張思維導圖,jQuery知識點梳理jQuery
- linux知識知識點總結Linux
- Promise知識點Promise
- 面試知識點面試
- Laravel 知識點Laravel
- 通用知識點
- 前端知識點前端
- ajax知識點
- rabbitmq 知識點MQ
- Redis知識點Redis
- SQL知識點(+)SQL
- JavaWeb知識點JavaWeb
- MySQL知識點MySql
- 知識點——terms
- Weex 知識點
- mybatis知識點MyBatis
- SASS知識點
- git 知識點Git
- KVO知識點