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

Variables a and b are scalar numbers. Variable s is a character string.<br />

The type of a variable is determined by the value assigned to it.<br />

Tip<br />

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

Manual.<br />

Note About Numbers<br />

Variables declared with an integer value are stored and handled as integer values to save<br />

memory space. For example the b variable in the example above is an integer variable.<br />

However, the type is automatically changed to floating point representation (always in double<br />

precision) when required. For example:<br />

set a=5 b=2 c=0<br />

c = a/b<br />

Expression a/b evaluates to 2.5 (not 2) and assigns 2.5 to c (although c was initially an integer).<br />

Also, floating point expressions are changed to integer when used as vector indices.<br />

Related Topics<br />

Variables<br />

Variable Assignment<br />

Variables take an initial value using the set command. The type of the variable is inherited from<br />

this initial assignment. Variables are changed through assignments using the = operator; they<br />

may also change value when they are passed as task output arguments. Variables can change<br />

type if they are assigned a value of a type different to their current type.<br />

Examples<br />

set a = 2<br />

set b = 3<br />

set s = "hello"<br />

set c = sin(2*3.14159*1e6*100e-9)<br />

set i = a + 1<br />

Several initial assignments can occur within a single set command, so:<br />

set a = 2<br />

set b = 3<br />

is equivalent to:<br />

set a = 2 b = 3<br />

822<br />

Eldo® User's Manual, 15.3

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

Saved successfully!

Ooh no, something went wrong!