Describes how to take advantage of the automatic error
detection feature.
For this very first start with an OPL model, you have
copied and pasted an existing model for quicker results. In your real
business life, however, you will enter OPL statements from the keyboard.
By default, the IDE checks for syntax and semantic errors automatically
as you type and error messages are displayed in the Problems tab
at the bottom of the IDE.
To observe the default behavior:
In the second line of MyFirstProject.mod displayed
in the Editing Area, remove the “s” from the end of
the word “Resources”.
Figure 1. A syntax error
The line containing the error is highlighted and for
this line any other line affected by the error, a red error symbol
appears in the margin . The Problems tab
immediately displays the corresponding error messages, indicating
the description, location, and source.
Figure 2. Problems tab
Remove the mistake. The error message disappears and
the indicators in the editor disappear.
Press Ctrl+S or
choose File > Save or press
the Save button in the standard
toolbar to save your work.
In the next step, you will add two data files to the
project.