• Function returning a struct
    Hi, How come the 51 compiler V7.04 cannot compile the following code? typedef struct { int i; } S; S jj(void) { S k; return(k); } S i(void) { return(jj()); } void main(void...
  • Array of struct within struct
    Has anyone defined an array of struct inside another struct with C51? I can find no reference document prohibiting it. Yet, when I try to compile following fragment: #include <stdio.h> struct...
  • accessing pointer structs in debug function
    Hi all, I'm using the debug function (SIGNAL) for testing the code. Whereas there's no problem writing values to local variables, the debugger seems to freeze when accessing a pointer. Example...
  • Placing struct functions on specific regions
    What is the proper syntax to place struct functions in specific regions? Using something like the example below appears to ignore the #pragma statement, e.g. the object code for foo::bar() is not placed...
  • The length of struct
    Hi, I define a struct like below: typedef struct { unsigned type :6; unsigned delete :1; unsigned mask :1; }UnitType; I think the length of this struct is 1 byte, but to my surprise,...