NXC: string-upcase? string-downcase?

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
mightor
Site Admin
Posts: 1079
Joined: 25 Sep 2010, 15:02
Location: Rotterdam, Netherlands
Contact:

Re: NXC: string-upcase? string-downcase?

Post by mightor »

They're not for strings specifically, it says they're for arrays :) However, the compiler still needs some work to make it work, so you'll have to hold your proverbial horses until that's all setup. Although, at the pace John cranks out changes to NXC, I doubt you'll be left waiting for long.

- Xander
| My Blog: I'd Rather Be Building Robots (http://botbench.com)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
afanofosc
Site Admin
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN
Contact:

Re: NXC: string-upcase? string-downcase?

Post by afanofosc »

If you download the latest test release zip from the test_releases folder and install the 1.32 firmware on your NXT then the uplow.nxc program attached in the above message will compile.

As you can see from the code the NXC API now includes UpperCase and LowerCase functions which take a string (but, like many NXC API functions, does not support an NXC expression).

I haven't updated the templates or the nxc api defaults file so these functions will not show with Syntax Highlighting yet.

I know I need to split NXCDefs.h into separate files. Easier said than done but I will work on it.

John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: NXC: string-upcase? string-downcase?

Post by HaWe »

I know I need to split NXCDefs.h into separate files. Easier said than done but I will work on it.
admittedly OT: But if that's too much effort, what about not investing time for that but instead use your free time for writing a non-Lego compatible firmware which e.g. generates genuine ARM7 machine code?
(of course with a close to 100% ANSI compatible C compiler for the Bricxcc IDE, and maybe using a bootloader RAM to keep the std fw on the NXT - but the latter is not a must)
:D
mcsummation
Posts: 220
Joined: 23 Jan 2012, 17:07
Location: Round Rock, TX

Re: NXC: string-upcase? string-downcase?

Post by mcsummation »

afanofosc wrote:I know I need to split NXCDefs.h into separate files. Easier said than done but I will work on it.
Could I help with that task? Although I'm new to NXC, I've got years of experience programming. (Retired IBM programmer.)
Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 6 guests