|
I have posted sourcecode and the win32 build of beta 25 for NBC/NXC. The Linux
and Mac OSX binaries will be available later today.
February 8, 2007 - NBC 1.0.1.b25 beta is available.
- Fixes a string whitespace bug introduced in b22
- Fixes a division bug where 1st operand is negative and 2nd operand is unsigned
- Fixes bugs in the NBC and NXC file I/O macros
- Adds support in NXC for string indexing
string msg = "test";
msg[0] = 'C';
byte x = msg[2];
- Adds support in NXC for inline functions
inline int Double(const int x) { return x*2; }
- Adds support in NXC for const and reference function argument types
bool IsFooBar(int x, int &handle) { handle = 10; x = x+1; return x > 2; }
- Adds support in NXC for const variable declarations
const int myVar = 12; // myVar cannot be changed.
- Adds support in NXC for arrays of strings
string myStrings[];
ArrayInit(myStrings, "", 4); // set array of strings to a size of 4 (0..3)
myStrings[0] = "please work";
myStrings[1] = "testing";
- Improves NXC parameter type checking in function calls
- Adds NBC API macros to simplify NXT<->NXT bluetooth communication
ReceiveRemoteBool(queue, clear, bval, result)
ReceiveRemoteNumber(queue, clear, val, result)
ReceiveRemoteString(queue, clear, str, result)
ReceiveRemoteMessageEx(queue, clear, str, val, bval, result)
SendRemoteBool(conn, queue, bval, result)
SendRemoteNumber(conn, queue, val, result)
SendRemoteString(conn, queue, str, result)
SendResponseBool(queue, bval, result)
SendResponseNumber(queue, val, result)
SendResponseString(queue, msg, result)
- Adds NBC API macros for sending direct commands to another NXT
RemoteMessageRead(conn, queue, result)
RemoteMessageWrite(conn, queue, msg, result) // alias for SendRemoteString
RemoteStartProgram(conn, filename, result)
RemoteStopProgram(conn, result)
RemotePlaySoundFile(conn, filename, bloop, result)
RemotePlayTone(conn, frequency, duration, result)
RemoteStopSound(conn, result)
RemoteKeepAlive(conn, result)
RemoteResetScaledValue(conn, port, result)
RemoteResetMotorPosition(conn, port, brelative, result)
RemoteSetInputMode(conn, port, type, mode, result)
RemoteSetOutputState(conn, port, speed, mode, regmode, turnpct, runstate,
tacholimit, result)
- Adds NXC API macros to simplify NXT<->NXT bluetooth communication
result = ReceiveRemoteBool(queue, clear, bval)
result = ReceiveRemoteNumber(queue, clear, val)
result = ReceiveRemoteString(queue, clear, str)
result = ReceiveRemoteMessageEx(queue, clear, str, val, bval)
result = SendRemoteBool(conn, queue, bval)
result = SendRemoteNumber(conn, queue, val)
result = SendRemoteString(conn, queue, str)
result = SendResponseBool(queue, bval)
result = SendResponseNumber(queue, val)
result = SendResponseString(queue, msg)
- Adds NXC API macros for sending direct commands to another NXT
result = RemoteMessageRead(conn, queue)
result = RemoteMessageWrite(conn, queue, msg) // alias for SendRemoteString
result = RemoteStartProgram(conn, filename)
result = RemoteStopProgram(conn)
result = RemotePlaySoundFile(conn, filename, bloop)
result = RemotePlayTone(conn, frequency, duration)
result = RemoteStopSound(conn)
result = RemoteKeepAlive(conn)
result = RemoteResetScaledValue(conn, port)
result = RemoteResetMotorPosition(conn, port, brelative)
result = RemoteSetInputMode(conn, port, type, mode)
result = RemoteSetOutputState(conn, port, speed, mode, regmode, turnpct,
runstate, tacholimit)
John Hansen
http://bricxcc.sourceforge.net/
|
|
Message has 1 Reply: | | Re: NXC/NBC release news
|
| Hi, Sorry for asking a naive question but I have been trying to create and manipulate an array of strings in NXC without much success. Here is the little test program that I use: #include "NXCDefs.h" task main() { string sarr[]; ArrayInit(sarr, (...) (18 years ago, 30-Mar-07, to lugnet.robotics)
|
4 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
Active threads in...
Robotics
NXT programmable brick
|
|
|
|