Re: c18 字串函數的 :Warning [2054]
|
||||
---|---|---|---|---|
資深會員
|
如果你是看microchip函數庫那個檔案的話當然是找不到那個函數
那函數在c18 的string.h 裡可以找到 我想strlenpgm應該是後來的新版c18新增進去的 但函式庫說明檔 並沒有跟著更新 所以囉.....
發表於: 2005/8/26 10:29
|
|||
|
Re: c18 字串函數的 :Warning [2054]
|
||||
---|---|---|---|---|
資深會員
|
strlenpgm(RomMsg1)
strlenpgm(&RomMsg1[0]) 兩種語法都試過...結果一樣
發表於: 2005/8/25 15:44
|
|||
|
Re: c18 字串函數的 :Warning [2054]
|
||||
---|---|---|---|---|
版主
|
strlenpgm(&RomMsg1); 是 ??? , C18當然看不懂
改成 strlenpgm(RomMsg1) 或 strlenpgm(&RomMsg1[0]) ;
發表於: 2005/8/25 14:29
|
|||
|
c18 字串函數的 :Warning [2054]
|
||||
---|---|---|---|---|
資深會員
|
#include <p18f252.h>
#include <string.h> const rom far char RomMsg1[]="PIC18F252"; void main(void) { unsigned char len; len=strlenpgm(&RomMsg1); } 如上面程式, 編譯時都會顯示 Warning [2054] suspicious pointer conversion 但是執行結果是正榷的 請問出現那個警告正常現象嗎? 有無方法消除(看起來很礙眼) ??
發表於: 2005/8/24 8:44
|
|||
|