Neutone
 
 
  Joined: 08 Sep 2003 Posts: 839 Location: Houston 
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		
			
				| Re: string functions | 
			 
			
				 Posted: Mon Apr 14, 2003 11:26 am     | 
				     | 
			 
			
				
  | 
			 
			
				:=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 | 
			 
		  |