Loginskip to content

October 12th, 2006

Next Bytes Code 1.0.1 b10 Available

John Hansen has released an updated NBC beta.

This beta release implements multi-dimensional array support. It has additional macros in NXTDefs.h for motor and sensor control. It moves all forms of optimization under the control of a command-line switch (-Z, -Z1, or -Z2). The optimizations that were always executed in beta 8 are now only executed if you set the optimization level to at least level 1. -Z and -Z2 both set the optimization level to 2. Level 2 optimizations replace several different patterns of code with simplified equivalents.

NBC now has special tokens that can be used in macros or elsewhere for useful purposes. The tokens are __FILE__, __LINE__, __VER__, __THREADNAME__, __I__, __J__, __ResetI__, __ResetJ__, __IncI__, __IncJ__, __DecI__, and __DecJ__. The compiler will also replace ## wherever it exists in the sourcecode with nothing (even within strings). These tokens make it possible to define preprocessor macros which can be used repeatedly in the same thread or in multiple concurrent threads without causing threading problems or producing duplicate label names. The values of __I__ and __J__ are automatically reset to zero at the start of each new thread or subroutine.