Home Demos Forum Research Guide
Viewing topic in forum 'announcements'
back to topic list

Dana v162
Dana v162 provides bug fixes and also some new features. Here we introduce the main new features - extended search paths, a new operation for concurrency control, and a new library.

Specifying additional search paths using -sp

In previous versions of Dana, only resource files and components from either the current project directory, or from the central source tree, could be included for use in the project. This could be limiting in cases where you have multiple projects that need to use shared code but you're not ready to integrate the shared code into the central source tree.

We've therefore added an option to both the compiler and runtime which allows you to specify further directories in which to search for resource files (e.g. interfaces) or implementing components. These directories are specified as a list separated by semi-colons, for example:


dana -sp c:\shared_utils;c:\orion\ MyProgram
 


Note that any such directories must be organised as standard Dana projects, with a "resources" directory and symmetrical directory trees for implementing components.

New operation: dana.joinAllThreads()

This operation waits for all asynchronous threads to finish that have been started by this object instance. It's generally useful as part of a destructor function and would be preceded by setting a flag to indicate that the object is being destroyed.

This might look like:


component provides MyObject(Destructor) {
   bool destroying
   void Destructor:Destroy() {
      destroying = true
      dana.joinAllThreads()
      }
}
 


This kind of procedure can be an important part of runtime adaptation - if this is not done, all remaining active threads may be forcibly destroyed by the runtime when the object is destroyed.

Basic math library

Finally, we've added a simple mathematical utility library, in util.Math, with (for now) a function that computes square roots for integers. More to come in future!

Happy coding :-)
by barry on 2016-02-05 11:07:44 (0 replies)

© Francis Research Ltd. 2017