CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

string functions

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Gerrit Faas
Guest







string functions
PostPosted: Mon Apr 14, 2003 10:38 am     Reply with quote

Hello All,

I just used some string functions in my code. It's anoying
that you can't used pointers to constants.

Is there some one how has some library (and want to share)
where part of these problems are solved.



Regards,

Gerrit
___________________________
This message was ported from CCS's old forum
Original Post ID: 13657
Neutone



Joined: 08 Sep 2003
Posts: 839
Location: Houston

View user's profile Send private message

Re: string functions
PostPosted: Mon Apr 14, 2003 11:26 am     Reply with quote

:=Hello All,
:=
:=I just used some string functions in my code. It's anoying
:=that you can't used pointers to constants.
:=
:=Is there some one how has some library (and want to share)
:=where part of these problems are solved.
:=
:=
:=
:=Regards,
:=
:=Gerrit

This is an overview from an example published by Peter H. Anderson. This can be purchased.

In program ROM_1.C this technique is used to initialize a string and, display the string at run time. In program
ROM_2.C (not shown in this discussion), this is extended such that multiple strings are stored in a continuous
memory area. To display the nth string, the program traverses the memory counting the number of ‘\0’
characters. That is to display string 2, the program traverses the memory until it has found two ‘\0’ characters
corresponding to string 0 and string 1, and then fetches the characters until the ‘\0’ character associated with
string 2 is found.

This is probably the most compact method of storing strings with a PIC18 series.
___________________________
This message was ported from CCS's old forum
Original Post ID: 13658
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group