• slider image 442
  • slider image 483
  • slider image 484
  • slider image 485
  • slider image 486
  • slider image 487
  • slider image 488
  • slider image 491
:::


Browsing this Thread:   1 Anonymous Users






Re: c18 字串函數的 :Warning [2054]
#5
資深會員
資深會員


查看用戶資訊
如果你是看microchip函數庫那個檔案的話當然是找不到那個函數
那函數在c18 的string.h 裡可以找到

我想strlenpgm應該是後來的新版c18新增進去的
但函式庫說明檔 並沒有跟著更新
所以囉.....

發表於: 2005/8/26 10:29
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: c18 字串函數的 :Warning [2054]
#4
中級會員
中級會員


查看用戶資訊
奇怪,C18找不到這個strlenpgm函式?


Strcat 將源字串的拷貝添加到目標字串的末尾。
strcatpgm2ram

strchr 查找某個值在字串中首次出現的位置。

Strcmp 比較兩個字串。
strcmppgm2ram

strcpy 將一個字串從資料記憶體或程式記憶體複製到資料記憶體。
strcpypgm2ram

strcspn 計算從字串開頭不包含在另一組字元中的連續字元數。
strlen 確定字串的長度。
strlwr 將字串中所有大寫字元轉換為小寫。

Strncat 將源字串中指定數目的字元添加到目標字串的末尾。
strncatpgm2ram

strncmp 比較兩個字串,直到指定的字元數。


Strncpy 將源字串中的字元複製到目標字串,直到指定的字元數。
strncpypgm2ram

strpbrk 查找一組字元中的某個字元在另一個字串中首次出現的位置。

strrchr 在字串中查找指定字元最後一次出現的位置。

strspn 計算從字串開頭包含在另一組字元中的連續字元數。

Strstr 查找某字串在另一字串中首次出現的位置。

strtok 將空字元插入到指定的分隔符號號處,把某個字串分隔為子字串或符號。

strupr 將某個字串中的所有小寫字元轉換為大寫。

發表於: 2005/8/26 1:32
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: c18 字串函數的 :Warning [2054]
#3
資深會員
資深會員


查看用戶資訊
strlenpgm(RomMsg1)
strlenpgm(&RomMsg1[0])
兩種語法都試過...結果一樣

發表於: 2005/8/25 15:44
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: c18 字串函數的 :Warning [2054]
#2
版主
版主


查看用戶資訊
strlenpgm(&RomMsg1); 是 ??? , C18當然看不懂

改成 strlenpgm(RomMsg1) 或 strlenpgm(&RomMsg1[0]) ;

發表於: 2005/8/25 14:29
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


c18 字串函數的 :Warning [2054]
#1
資深會員
資深會員


查看用戶資訊
#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
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部







You can view topic.
不可以 發起新主題
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.

[進階搜尋]


:::

Microchip連結

https://www.facebook.com/microchiptechnologytaiwan/
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=13
https://mu.microchip.com/page/tmu
http://elearning.microchip.com.tw/modules/tad_link/index.php?cate_sn=1
https://page.microchip.com/APAC-PrefCenters-TW.html
http://www.microchip.com/
http://www.microchip.com/treelink
http://www.microchipdirect.com/
http://www.microchip.com.cn/newcommunity/index.php?m=Video&a=index&id=103
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=2
http://www.microchip.com.tw/Data_CD/eLearning/index.html
http://www.microchip.com.tw/RTC/RTC_DVD/
https://www.microchip.com/development-tools/
https://www.youtube.com/user/MicrochipTechnology
[ more... ]

教育訓練中心

!開發工具購買
辦法說明 [業界客戶] [教育單位]
----------------------------------
!校園樣品申請
辦法說明 [教師資格] [學生資格]
----------------------------------