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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/23/08 16:56
Modified:
  04/23/08 17:06

Read: times


 
#153897 - Yeah, I ment Keil C51 - doesnt support 2D arrays?
Responding to: ???'s previous message
I cross posted only so I'd get an answer faster, sorry if that offends you :)


I tried breaking down the array, and it still doesnt work:


const unsigned char font[7][26];

font[0] = {0x22,0x3c,0x1c,0x3c,0x3c,0x20,0x1c,0x22,0x1c,0x1c,0x22,0x3c,0x22,0x22,0x1c,0x20,0x1c,0x22,0x1c,0x08,0x1c,0x08,0x22,0x22,0x08,0x3e};
font[1] = {0x22,0x22,0x22,0x22,0x20,0x20,0x22,0x22,0x08,0x22,0x24,0x20,0x22,0x22,0x22,0x20,0x26,0x22,0x22,0x08,0x22,0x14,0x36,0x22,0x08,0x20};
font[2] = {0x3e,0x22,0x20,0x22,0x20,0x20,0x2e,0x22,0x08,0x22,0x28,0x20,0x22,0x26,0x22,0x3c,0x2a,0x3c,0x02,0x08,0x22,0x22,0x2a,0x14,0x08,0x10};
font[3] = {0x22,0x3c,0x20,0x22,0x3c,0x3c,0x20,0x3c,0x08,0x02,0x30,0x20,0x22,0x2a,0x22,0x22,0x22,0x22,0xac,0x08,0x22,0x22,0x22,0x08,0x14,0x08};
font[4] = {0x22,0x22,0x20,0x22,0x20,0x20,0x20,0x22,0x08,0x02,0x28,0x20,0x2a,0x32,0x22,0x22,0x22,0x22,0x20,0x08,0x22,0x22,0x22,0x14,0x22,0x04};
font[5] = {0x22,0x22,0x22,0x22,0x20,0x20,0x22,0x22,0x08,0x02,0x24,0x20,0x36,0x22,0x22,0x22,0x22,0x22,0x22,0x08,0x22,0x22,0x22,0x22,0x22,0x02};
font[6] = {0x1c,0x3c,0x3c,0x3c,0x3e,0x3e,0x1c,0x22,0x1c,0x02,0x22,0x20,0x22,0x22,0x1c,0x3c,0x1c,0x3c,0x1c,0x3e,0x22,0x22,0x22,0x22,0x22,0x3e};




The errors I'm getting are

FUNCTIONS.C(9): error C141: syntax error near '{'
FUNCTIONS.C(9): error C141: syntax error near '}'
FUNCTIONS.C(10): error C141: syntax error near '{'
FUNCTIONS.C(10): error C141: syntax error near '}'
FUNCTIONS.C(11): error C141: syntax error near '{'
FUNCTIONS.C(11): error C141: syntax error near '}'
FUNCTIONS.C(12): error C141: syntax error near '{'
FUNCTIONS.C(12): error C141: syntax error near '}'
FUNCTIONS.C(13): error C141: syntax error near '{'
FUNCTIONS.C(13): error C141: syntax error near '}'
FUNCTIONS.C(14): error C141: syntax error near '{'
FUNCTIONS.C(14): error C141: syntax error near '}'
FUNCTIONS.C(15): error C141: syntax error near '{'
FUNCTIONS.C(15): error C141: syntax error near '}'
FUNCTIONS.C(17): error C241: 'append_letter': auto segment too large


(append_letter is the name of the function that contains the array)

List of 18 messages in thread
TopicAuthorDate
Problem with arrays (atmel 8052)            01/01/70 00:00      
   What compiler?            01/01/70 00:00      
   Strange way of declaring a font.            01/01/70 00:00      
      Why is it strange?            01/01/70 00:00      
   what compiler?            01/01/70 00:00      
      I'm using Keil uVision 3            01/01/70 00:00      
         That's not a Compiler...            01/01/70 00:00      
            Yeah, I ment Keil C51 - doesnt support 2D arrays?            01/01/70 00:00      
               Not valid syntax            01/01/70 00:00      
                  Andy I think you want a semi-colon at the end            01/01/70 00:00      
                     True:            01/01/70 00:00      
   Too large            01/01/70 00:00      
      Almost there!            01/01/70 00:00      
         Warning            01/01/70 00:00      
            Thanks you VERY VERY much!            01/01/70 00:00      
               You are welcome!            01/01/70 00:00      
   The number of dimensions is incorrect            01/01/70 00:00      
   problem was wrong method used            01/01/70 00:00      

Back to Subject List