Salesforce

How Do I Syntax Check a Program? (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

How Do I Syntax Check a Program? (Magic xpa 3.x)

Before you run a program in any language, you should check it for correct syntax. Since Magic xpa does not force you to compile a program before running it, the syntax check is optional, but if the program has errors, it will run incorrectly.

It only takes a few seconds to syntax check a Magic xpa program. When the syntax check is completed, you will be presented with a list of errors (if there are any). Clicking on an error will cause you to jump to that error so you can fix it.

You can also syntax check a list of programs all at once. This is a good thing to do before putting a new application into production, to ensure no errors have crept in.

Syntax checking one program

  1. Position the cursor on the program you want to check.

  2. Press F8 (Options->Check syntax). You will see some screens flash, and then one of two things will happen:

    • You will see “Program is ok” on the status line, or

    • You will see “Check Syntax completed - Please refer to the Checker result pane” on the status line, and the Checker result pane will have some error messages in it. (If you don’t see the Checker result pane, select View->Checker Result (Alt+F3) to make it visible).

If you had errors, you can work through the list of errors using the Checker result list. See How Do I Use the Checker Results? for details on how to do this.

You can also customize which errors appear and in which order. See How Do I Control the Displayed Checker Messages?.

Syntax checking many programs at once

You can check a series of programs at one time. The error messages will all be grouped in the Checker result pane, and you can work through the list the same way you would when working with only one program.

  1. Position the cursor on the first program to check, or on the header line to check all the programs in that section. If you are working with only one folder, only that folder will be checked.

  2. Press Alt+F8 (Options->Check to end).

  3. You will be prompted with a confirmation box “Delete all unused expressions”. If you click on Yes, then expressions that may exist, but are not referenced, will be automatically deleted without prompting you first.

  4. The syntax checker will run through all the programs in the list, and the errors will be listed in the Checker result pane.

Reference
Attachment 
Attachment