ucNewThread

 

See Also:  ucReleaseItem, Thread Handling

 

Allocates a new thread, and returns its handle for use in subsequent definitions.

 

ucNewThread([ParentThread])

 

Parameter

      ParentThread

Optional.  If this argument is supplied, then all definitions from the parent thread are inherited in the new thread.  If this argument is omitted, then the default thread is used as the parent thread.  The default thread is where all items in the include file (arithmetic operators, data types, patterns, etc...) are defined.

 

Remarks

 

uCalc allows you to define a group of definitions into a given thread, so that they are completely independent from definitions in other threads.  Functions such as ucDefine, ucDefineFunction, ucDefineVariable, etc... all have an optional last argument, that accepts a thread handle.  For that argument, you can use the handle supplied by ucNewThread.  So, you might define function f(), and variable x one way in one thread, and items with the same names a different way in another thread.  See Thread Handling for more details.