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.

Examples<br />

Eldo Control Language<br />

Library of Functions for Tasks<br />

.define_task parse_file<br />

/* Same example but using fscan instead of fgets and strtok. */<br />

set vdd = 0.0 /* Be careful to declare vdd as a floating point number<br />

(required for '%f'). */<br />

set temp = 0 /* Be careful to declare temp as an integer(required for<br />

'%d'). */<br />

set corner = "" /* Be careful to declare corner as a string(required for<br />

'%s'). */<br />

set myfile = fopen("./corners.txt", "r")<br />

while(fscan(myfile, "vdd=%f, temp=%d, corner=%s\n", vdd, temp, corner)<br />

== 3)<br />

fprint(stdout, "Parsed line: vdd=%.4e, temp=%d, corner=%s\n", vdd,<br />

temp, corner)<br />

endwhile<br />

fclose(myfile)<br />

.end_define_task<br />

Related Topics<br />

Library of Functions for Tasks<br />

sscan<br />

fprint<br />

fclose<br />

Tasks<br />

Variables<br />

Flow Control Statements<br />

Eldo® User's Manual, 15.3 909

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

Saved successfully!

Ooh no, something went wrong!