#usage textimplements a standard way to make this information available.
If the #usage directive is present, its text (which has to be a string constant) will be used in the Control Panel to display a description of the program.
In case the ULP needs to use this information in, for example, a dlgMessageBox(), the text is available to the program through the builtin constant usage.
Only the #usage directive of the main program file (that is the one started with the RUN command) will take effect. Therefore pure include files can (and should!) also have #usage directives of their own.
It is best to have the #usage 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.
Example
#usage "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"
Index | Copyright © 2002 CadSoft Computer GmbH |