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 />

Functions<br />

.define_function f_avg (a[]=0, i1=1, i2=1)<br />

set tmp=0 i=0<br />

step (type=linear, param=i, start=i1, stop=i2, step=1)<br />

tmp = tmp + a[i]<br />

endstep<br />

tmp = tmp / (i2 - i1 + 1)<br />

return tmp<br />

.end_define_function<br />

Once a function is defined, it can be used wherever its return type can be used. For example:<br />

set tprop[0,99]=0 n=100 avg=0<br />

avg = f_avg(a=tprop, i1=0, i2=n-1)<br />

840<br />

Eldo® User's Manual, 15.3

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

Saved successfully!

Ooh no, something went wrong!