wishlist for NXC
Posted: 30 Sep 2010, 19:23
hi John,
will be here a wishlist for NXC improvements?
will be here a wishlist for NXC improvements?
Give a child a robot, he'll play for an hour. Teach him to build, and he'll play forever.
https://mindboards.org:443/
I see if I can dig up a few more.NXTFreak wrote: Hey Mr. Hansen. I was wondering if you could add support to NXC for struct initialization, identical to the syntax used in C:
Code: Select all
typedef struct { string firstName; string lastName; unsigned int age; string pets[]; } person; person person1 = {.age = 55, .firstName = "Steve", .lastName = "Jobs"}; person person2 = {"Bill", "Gates", 54}; person person3 = {.pets = {"Tiger", "Lulubell"}};
Code: Select all
int foobar(int x, int y) { return x+y; }
string foobar(string x, string y) { return x + y; }
Having overloaded functions would allow me to make the NXC Sensor MUX driver transparent in its use. That would be pretty sweet.afanofosc wrote:One thing I know Xander has wished for is support for overloaded functions so that you could write:
..
Hopefully I will have both the time and the mental prowess to implement that feature later this year.
Code: Select all
printfXY(x,y, "format string", var1, var2, var3, var4...);
I will have to go back and look at the firmware source code to remind myself, but I recall thinking at the time that the firmware was throwing away direct command response messages for all direct and system commands except for the read message command, which it handles and copies the response message into the appropriate mailbox. I could modify the enhanced NBC/NXC firmware to do something different. But it might be possible to just grab the response from the bluetooth input buffer just like people do with GPS data (but easier due to the content following the LEGO protocol specifications). It depends on if the RC Handler function erases the data or just ignores it.physics-matt wrote:How about implementing all the Direct Commands in NXC?
There appear to be some, but not all. For instance, there is no GetInputValues.