10.06.2016 Views

eldo_user

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Eldo Control Language<br />

Library of Functions for Tasks<br />

nextval<br />

Task function category: Functions Operating on Waveforms<br />

Returns the next point of a waveform. Returns 0 if there are no more points in the waveform,<br />

otherwise x_res and y_res are set with the coordinates of the next point of the waveform.<br />

Usage<br />

nextval(wf, x_res, y_res)<br />

Arguments<br />

• wf<br />

Waveform identifier.<br />

• x_res<br />

Variable name for X coordinate of next point in waveform. Must be a double-precision<br />

floating-point variable otherwise an error is generated.<br />

• y_res<br />

Variable name for Y coordinate of next point in waveform. Must be a double-precision<br />

floating-point variable otherwise an error is generated. If wf is a complex waveform, then<br />

y_res must be a complex number.<br />

Description<br />

Must be called after beginval.<br />

Examples<br />

Example 1:<br />

/* here, the float value 0.0 and not the integer 0 must be assigned to x<br />

and y otherwise there will be an error when calling beginval and nextval.<br />

*/<br />

set x = 0.0<br />

set y = 0.0<br />

set iter = 0<br />

iter = beginval(wave1, x, y)<br />

while (iter != 0)<br />

fprint(stdout, "(%12.4e;%12.4e)\n", x, y)<br />

iter = nextval(wave1, x, y)<br />

endwhile<br />

Example 2:<br />

940<br />

Eldo® User's Manual, 15.3

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

Saved successfully!

Ooh no, something went wrong!