Andrew Leiper 0 Posted February 1, 2011 Report Share Posted February 1, 2011 Hi there, boostc V7.01 PIC18F2525 Please see comments in the code below: /////////////////////////////////////// #include <system.h> typedef struct { unsigned char bitfield1; unsigned char bitfield2; unsigned char bitfield3; } TTestStruct; TTestStruct s; void SetAVal(TTestStruct *ps) { //This doesn't work because *ps gets copied into a temp variable //which never gets copied back. (*ps).bitfield3 = 5; //This works ps->bitfield3 = 5; } void main(void) { SetAVal(&s); } /////////////////////////////////////// Cheers, Andy Leiper IET Ltd Quote Link to post Share on other sites
Pavel 0 Posted February 7, 2011 Report Share Posted February 7, 2011 Fixed. Fix will be available in 7.02. Thanks for reporting. Regards, Pavel Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.