10.06.2016 Views

eldo_user

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Eldo Control Language<br />

Statement Overview<br />

set b[]=0.1<br />

b[10]=1.0e-6<br />

In this example, the first statement creates an empty vector, b. The second assignment extends<br />

the range of b to [10,10]. The elements b[10] is set to 1.0×10 −6 .<br />

Filling Vector Sub-range<br />

It is possible to fill a sub-range of a vector with a value using the assignment operator. For<br />

example:<br />

set b[-5,5]=1.414<br />

set i = 0<br />

step (param=i, start=0, stop=5, step=1)<br />

b[i] = 1.732<br />

endstep<br />

is a very complicated way to accomplish the same as:<br />

set b[-5,5]=1.414<br />

b[0,5] = 1.732<br />

Filling can simultaneously extend the range if needed:<br />

set b[-5,5]=1.414<br />

b[-10,10] = 1.732<br />

It is possible to use negative indexes such as in:<br />

set a[-50,50] = 10<br />

which would declare a vector containing 101 values, addressable from a[-50] to a[50]. The<br />

entire vector is initially filled with the value 10.0. Explicitly specifying an initial fill-in value is<br />

mandatory.<br />

Although negative indices are allowed, the addressing is always in ascending order; in other<br />

words, imax must be greater than or equal to imin.<br />

To explicitly define a one-dimensional array with different values specify them inside {}. If<br />

used inside a declaration, the default value of the array is the first of the set; if not specified, the<br />

first index of the array is 1. The ranges, when explicitly specified, must correspond otherwise an<br />

error will occur at run-time. Examples:<br />

Eldo® User's Manual, 15.3 827

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!