Open Source Automation Development Lab
You are here: Home / OSADL / News / 
2009-01-08 - 01:28

Next Events:

Embedded World 2009
03.03 - 05.03

Breaking News:

2008-11-24 12:00

We are 25 now!

OSADL welcomes its new member Hirschmann Automation and Control GmbH, Ettlingen, Germany


2008-11-10 12:00

"Immediate C" has arrays now

Version 1.124 of John E. Wulff's PLC-extension of the C language is now online


2008-11-07 12:00

OSADL Fieldbus Framework Meeting at the SPS/IPC/Drives 2008

Working group aiming towards a transparent, object-oriented fieldbus API



2008-11-10 12:00 Age: 59 Days

"Immediate C" has arrays now

By: Carsten Emde

Version 1.124 of John E. Wulff's PLC-extension of the C language is now online

Thanks to John E. Wulff, the immediate C language knows now about arrays. An entire section of the revised documentation (V1.124) is devoted to arrays and to the difference of handling arrays between conventional instruction flow languages and data flow languages such as immediate C.

The first couple of paragraphs of the newly added section on arrays in the immediate C documentation read as follows:

3   Arrays
Arrays in conventional instruction flow languages are a named collection (often of fixed length) of similar variables, which are accessed by an index expression, eg a[5]. Each such entity is an individual object, but in instruction flow languages the index is often a variable, which is manipulated in a loop and references to the individual indexed entities occur sequentially, as in the following C example:
  for (n = 0; n < 4; n+) {
    a[n] = b[n] * c[n];
  }

3.1 Immediate Arrays
In data flow languages like immediate C, loops at run-time are meaningless. Each immediate variable is an entity, which is controlled by one assignment statement. The variable changes, when a variable in the expression of the controlling statement changes and not when some loop runs. It is well to remember, that immediate variables and their controlling expressions are more like IC building blocks connected in a static network. In that sense immediate Arrays are like hardware registers.

Arrays may be defined in immediate C, but each entity acts individually at run-time, which means that an individual immediate object must be generated for each immediate array member.

Read on here. The software archive is available for download here.