Wow, that makes no sense why it does not work. Weird...mcsummation wrote:I made the macro handle the mutex issue.
However, I have another thing now:Why don't the last two work? The next to the last says "Data types are not compatible". The last one gives that plus a couple of other errors which would be secondary issues.Code: Select all
struct a { string b; string c[]; }; a aa; string d[]; string e; long l; task main() { e = FlattenVar(l); // This works. d[0] = FlattenVar(l); // So does this. aa.b = FlattenVar(l); // And, yet again, it works. aa.c[0] = e; // This doesn't work. aa.c[0] = FlattenVar(l); // Neither does this. }
Mutex in a struct?
Re: Mutex in a struct?
Thanks, and have a nice day,
nxtboy III
programnxt.com
nxtboy III
programnxt.com
Re: Mutex in a struct?
The last two don't work because my compiler's homegrown parsing code isn't written to handle that particular syntax. But even if it did handle that syntax you would likely run into strange crashes that could be a compiler defect or a firmware defect related to complex structs - where "complex" means "containing 2d arrays" (and maybe other things too). Remember that an array of string is a 2d array of byte. My advice?
KISS.
John Hansen
KISS.
John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
http://bricxcc.sourceforge.net/
Who is online
Users browsing this forum: Semrush [Bot] and 1 guest