wishlist for NXC

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: wishlist for NXC

Post by HaWe »

if once a TR network for rs485, nxtBee and BT will have been established -
64bit floats (double) would be fine :)))
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: wishlist for NXC

Post by HaWe »

*bump*
not to forget...(edited):
doc-helmut wrote: as meanwhile the nxcdefs.h has grown big enough to sink the whole Royal Navy^^ i would appreciate if we could get more distinct header files to be C-like #included, e.g.
stdio.h (display, button, file io)
sensors.h
motors.h
comm.h (for BT and rs485 and general i2c)
stdlib.h (math, array, and strings calculation/manipulation/statistics and all the rest)
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: wishlist for NXC

Post by HaWe »

the error messages of the compiler are really odd and are quite ununderstandable.
Ain't it possible that the errors refer to the original variable names or identifiers instead of __main_7qG2_i_7qG2_001, __main_7qG2_j_7qG2_003?
domsel wrote:# Status: NBC compilation failed.
# Error: Error parsing expression: datad[__main_7qG2_i_7qG2_001][__main_7qG2_j_7qG2_003]
File "/home/dominik/Dropbox/TAIS-HiWi/test nbc/portalx.nxc" ; line 32
#
#----------------------------------------------------------
# Error: Error parsing expression: tmp[__main_7qG2_i_7qG2_001][__main_7qG2_j_7qG2_003]
File "/home/dominik/Dropbox/TAIS-HiWi/test nbc/portalx.nxc" ; line 34
#
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: wishlist for NXC

Post by mattallen37 »

The problem with it giving actual names as you defined, is that you could have many local variables with the same name (in different scopes). This way it tells you specifically which local variable (by name and by scope) it is talking about.
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: wishlist for NXC

Post by HaWe »

any names that refer more to the original source names would be already a small step if not a leap...
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: wishlist for NXC

Post by HaWe »

hmmm . indeed RobotC seems to provide recursions.... http://www.robotc.net/wiki/Recursion :evil:
what about NXC...? :ugeek:

Code: Select all

int rmax=9;

void rloop(int x) {
   if (x<rmax) { rloop(x+1); }
   else return;
}

task main() {
   rloop(0);
   while(1);
}
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: wishlist for NXC

Post by HaWe »

IMO it's not good that one always has to wait 15 ms for each USS call, because if one wants to poll many sensors in 1 polling loop a forced wait(15) for each USS reduces needlessly the polling frequence of all other sensors (touch or light or what ever) in the same loop.
E.g., having 3 USS and 4 touch sensors to read there's unnecessarily 45ms delay in that loop.

It should be possible to switch off the built-in wait(15) if one wants.
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: wishlist for NXC

Post by HaWe »

doc-helmut wrote:John,
would it be much effort to make for *.h the same txt highlighting available as for *.nxc?
John,very nice and convenient to have .h now also at once for standard file types in the file/open menu! Thx a lot!
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: wishlist for NXC

Post by HaWe »

*bump*
no recursions for NXC in competition with RobotC?
^^
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: wishlist for NXC

Post by mattallen37 »

I don't mean to speak for John, but I assume the previous still stands; recursions and/or pointers would require major rewriting of the FW, which John does not have the time/will to make happen in the foreseeable future. Just because ROBOTC supports it doesn't mean it would be any easier to add support for it in NXC. NXC is not in competition with ROBOTC, they are simply alternatives of the other.

I suggest you never again ask for recursions in NXC, since you are not the deciding factor, and you have already made your wish (abundantly) known.

Just a rhetorical question, but why do you want NXC to copy ROBOTC, if you are so opposed to ROBOTC?
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest