Checking Code Blocks for Errors

To check for errors in the current block of code:

1. Do one of the following:

  • On the Program menu, select Check for Errors.

  • On the toolbar, click the Check for Errors button.

2. One of the following dialogs is displayed:

  • If no errors are found in the current block of code, the Check for Errors dialog is displayed with the message "No errors found."

  • If one or more errors are found in the current block of code, the "Error List" dialog is displayed with a list of error messages, showing the relative line number within the current block for each error.

3. Select one of the errors from the list, then press the Close button.

Input focus is transferred to the Edit Code window. The error line will be highlighted.

The Build Program function from the Program menu also checks for errors, but it only reports one error at a time. The error checking included with the Build Program function is more comprehensive, because it is able to examine the entire program rather than just a line of code at a time.

There is a parameter in the gb.ini file called check_syntax. If this parameter is set to Yes, GUIBuilder checks each block of code for errors as it is saved to the .gbf file. In any errors are found, the "Syntax Errors" dialog will be displayed with the warning message "This code has syntax errors." (Note: The check_syntax function is set to No by default; to enable it, edit the gb.ini file.)