1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
<html>
<head>
<title>EAGLE Help: Constant Definitions</title>
</head>
<body bgcolor=white>
<font face=Helvetica,Arial>
<hr>
<i>EAGLE Help</i>
<h1><center>Constant Definitions</center></h1>
<hr>
<i>Constants</i> are defined using the keyword <tt>enum</tt>, as in
<pre>
enum { a, b, c };
</pre>
which would define the three constants <tt>a</tt>, <tt>b</tt> and <tt>c</tt>,
giving them the values <tt>0</tt>, <tt>1</tt> and <tt>2</tt>, respectively.
<p>
Constants may also be initialized to specific values, like
<pre>
enum { a, b = 5, c };
</pre>
where <tt>a</tt> would be <tt>0</tt>, <tt>b</tt> would be <tt>5</tt> and
<tt>c</tt> would be <tt>6</tt>.
<hr>
<table width=100% cellspacing=0 border=0><tr><td align=left><font face=Helvetica,Arial>
<a href=index.htm>Index</a>
</font></td><td align=right><font face=Helvetica,Arial size=-1>
<i>Copyright © 2005 CadSoft Computer GmbH</i>
</font></td></tr></table>
<hr>
</font>
</body>
</html>
|