Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/26/03 15:25
Read: times


 
#37313 - RE: "C" : putting characters into string
Why not try this..
It does what you are doing with your code , but uses far less data memory

//--------------------------------------------------------------
//Arrays start at 0 , so all are 1 less
enum position{pos_first,pos_second=4,pos_third=8,pos_fourth=12};

code unsigned char text_005[3] = {'0','0','5',};
code unsigned char text_120[3] = {'1','2','0',};

unsigned char timers[16]; //lcd line 2

void set_text(unsigned char pos,unsigned char * s){
unsigned char i;

for (i=0; i<3; i++){timers[pos + i] = (*s++);}
}

called as set_text(pos_first,text_005);

List of 14 messages in thread
TopicAuthorDate
"C" : putting characters into strings            01/01/70 00:00      
RE: "C" : putting characters into string            01/01/70 00:00      
RE: "C" : putting characters into string            01/01/70 00:00      
RE: "C" : putting characters into string            01/01/70 00:00      
printf - putting characters into strings            01/01/70 00:00      
RE: \\            01/01/70 00:00      
RE: "C" : putting characters into string            01/01/70 00:00      
RE: "C" : putting characters into string            01/01/70 00:00      
RE: "C" : putting characters into string            01/01/70 00:00      
RE: "C" : putting characters into string            01/01/70 00:00      
RE: tautology            01/01/70 00:00      
RE: tautology.....more            01/01/70 00:00      
RE: tautology.....more            01/01/70 00:00      
RE: "C" : putting characters into string            01/01/70 00:00      

Back to Subject List