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

Statement Overview<br />

if ((s_code1 == s_failed) || (s_code2 != s_ok))<br />

endif<br />

fprint (stdout, "Cannot complete task.\n")<br />

Note<br />

To have string comparison working accordingly to the intuitive alphanumerical order, you<br />

must ensure that numerical parts inside the strings to compare have the same number of<br />

digits (for example “string12” < “string3” but “string12” > “string03”).<br />

Strings can be concatenated using the + operator. For example:<br />

set s_ok = "success" s_fail = "failed" s_code1 = "" s_code2 = "whatever"<br />

set s_task_name = "task_sim1"<br />

s_result = s_task_name + " : " + s_fail<br />

fprint (stdout, s_result)<br />

See Library of Functions for Tasks for the complete list of functions operating on strings.<br />

Related Topics<br />

Variables<br />

Library of Functions for Tasks<br />

Vectors<br />

All vectors are dynamic; their dimensions are handled dynamically, as they are addressed<br />

(except if the .option set_<strong>eldo</strong>_cl_array_auto_expand is set to 0, in which case their sizes must<br />

be explicitly managed using the resize function).<br />

Tip<br />

See “.OPTION SET_ELDO_CL_ARRAY_AUTO_EXPAND” in the Eldo Reference<br />

Manual.<br />

One-dimensional and two-dimensional vectors are available for numbers and strings. A onedimensional<br />

vector is a contiguous array of numbers indexed with an integer number. The size<br />

of vectors is dynamic, and there is an automatic reallocation mechanism. The indexes are<br />

always signed 32-bit integer numbers; in other words, the maximum range is from −2×10 31 to<br />

2×10 31 −1.<br />

The declaration of a vector defines what it contains (numbers or strings) and, optionally, its<br />

initial dimension. The initial fill value is mandatory. The [] indicates that this variable is a<br />

vector, not a scalar.<br />

Eldo® User's Manual, 15.3 825

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

Saved successfully!

Ooh no, something went wrong!