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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/27/06 17:58
Modified:
  07/27/06 18:03

Read: times


 
#121192 - the original question is \"can you define a struct
Responding to: ???'s previous message
I said:
1. since all your fields seem to be U8, instead of a structure, use a two-dimensional array, with symbolic constants (#define or enum) to access the individual fields of each sign; eg,
all_signs[sign_number][SER_NUM]
Erik Malund said:
Not useful, it exist in two places at the sign (one) at the controller (many).


The structure is transmitted between two entities, a slave has one copy the master has one for each slave. Also, this does not address the desired fixed size of 256.

Ehh???
When you define the array, you define the size!

Absolutely, the original question is "can you define a struct where the compiler calculate the size of the filler/pad (SDfill[]) so that the struct end up always 256 bytes long.

Erik

List of 15 messages in thread
TopicAuthorDate
fixed size struct?            01/01/70 00:00      
   Not quite clear            01/01/70 00:00      
      thx, but            01/01/70 00:00      
         Confused!            01/01/70 00:00      
            the original question is \"can you define a struct            01/01/70 00:00      
               Possible in theory, but the code looks strange            01/01/70 00:00      
                  figured the dummy out myself but that is the road            01/01/70 00:00      
                  Doesn\'t have to look strange            01/01/70 00:00      
                     got it, thanks            01/01/70 00:00      
                        Aside - structure addressing            01/01/70 00:00      
                           which is the case in one of the instances            01/01/70 00:00      
                              nameless struct member            01/01/70 00:00      
   union of structs            01/01/70 00:00      
      same as Andy            01/01/70 00:00      
         Pascal            01/01/70 00:00      

Back to Subject List