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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
<html>
<head>
<title>EAGLE Help: #usage</title>
</head>
<body bgcolor=white>
<font face=Helvetica,Arial>
<hr>
<i>EAGLE Help</i>
<h1><center>#usage</center></h1>
<hr>
Every User Language Program should contain information about its function, how
to use it and maybe who wrote it.<br>
The directive
<pre>
#usage <i>text</i> [, <i>text</i>...]
</pre>
implements a standard way to make this information available.
<p>
If the <tt>#usage</tt> directive is present,
its <tt>text</tt> (which has to be a <a href=144.htm>string constant</a>)
will be used in the <a href=11.htm>Control Panel</a> to display a description
of the program.
<p>
In case the ULP needs to use this information in, for example, a
<a href=286.htm>dlgMessageBox()</a>, the <tt>text</tt> is available
to the program through the <a href=228.htm>builtin constant</a>
<tt>usage</tt>.
<p>
Only the <tt>#usage</tt> directive of the main program file (that is the one
started with the <a href=84.htm>RUN</a> command) will take effect.
Therefore pure <a href=135.htm>include</a> files can (and should!)
also have <tt>#usage</tt> directives of their own.
<p>
It is best to have the <tt>#usage</tt> directive at the beginning of the file,
so that the Control Panel doesn't have to parse all the rest of the text when
looking for the information to display.
<p>
If the usage information shall be made available in several langauges, the
texts of the individual languages have to be separated by commas.
Each of these texts has to start with the two letter code of the respective
language (as delivered by the <a href=248.htm>language()</a> function),
followed by a colon and any number of blanks. If no suitable text is found for
the language used on the actual system, the first given text will be used (this
one should generally be English in order to make the program accessible to the
largest number of users).
<p>
<b>Example</b>
<pre>
#usage "en: A sample ULP\n"
"Implements an example that shows how to use the EAGLE User Language\n"
"Usage: RUN sample.ulp\n"
"Author: john@home.org",
"de: Beispiel eines ULPs\n"
"Implementiert ein Beispiel das zeigt, wie man die EAGLE User Language benutzt\n"
"Aufruf: RUN sample.ulp\n"
"Author: john@home.org"
</pre>
<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>
|