在C 語言中,表達式是最重要的組成部分之一,幾乎
所有的代碼都由表達式構成。表達式的使用如此廣泛,讀
者也許會產生這樣的疑問,像+ 、- 、3 、/ 、& & 這樣簡單
的運算也會出現問題嗎? 程序員在編寫表達式時,往往帶
有一些不良的習慣。即使是編寫很簡單的表達式,這些不
良習慣也可能造成隱患,這個小小的隱患甚至可能引起整
個系統的崩潰。實際上,在程序調試過程中,表達式中存
在的大部分隱患皆來源于程序員的主觀臆測,即認為表達
式應該是按自己認為的方式執行,但結果可能完全相反。
這是因為程序設計語言或編譯器的某些內在機制并不如
我們所想的那樣。所有的編譯器都遵從這一假定:程序員
都是“神”,他們既了解編程語言的各種特性,也了解編譯
器本身一些鮮為人知的處理原則。當然, 程序員不是
“神”。因此,程序員在編寫程序的過程中需要小心地避免
編譯器“設置”的各種陷阱,而問題是有些時候很難預測下
一步是否會踏上一個陷阱
標簽:
表達式
語言
分
代碼
上傳時間:
2015-09-08
上傳用戶:jennyzai
CCS編程環境 使用的是匯編加C的混合編程方法:
The programme of the Correlation Algorithm.
Using INT2 to get the input signal.
Array x, in first step, is the input signal produced by programme,
in next step, is the input signal get from A/D,
the length is 128, 32-bit floating point.
Array y, in first step, is the input signal produced by programme,
in next step, is the input signal get from A/D,
the length is 128, 32-bit floating point.
Array cor is the Correlation result, the length is 255, 32-bit floating point.
標簽:
Correlation
Algorithm
programme
the
上傳時間:
2013-12-21
上傳用戶:leixinzhuo