次の方法で共有


Customizing the Documenting Wizard

In addition to the options that you choose when running the Documenting Wizard, you can customize additional options outside the wizard.

Indentation in CASE Structures

By default, the wizard looks for indentation in a CASE structure like this:

DO CASE
CASE case1=1
   case2=2
CASE case3=3
   case4=4
ENDCASE

Some developers prefer to indent the lines between DO CASE and ENDCASE an additional level like this:

DO CASE
   CASE case1=1
      case2=2
   CASE case3=3
      case4=4
ENDCASE

If you indent your CASE structures like the second example, specify this in Fdkeywrd.dbf. To specify this coding style in Fdkeywrd.dbf change the value of the Code field to "UU" for the ENDCASE record.

Wizard Directives

You can place special directives in your code files that instruct the Documenting Wizard to perform specific tasks when analyzing the code.

You can place directives in:

  • Your project's main program file to instruct the wizard how to analyze all code files in the project.
  • Individual code files to instruct the wizard how to analyze specific files.

The syntax of the directives begins with an asterisk so that Visual FoxPro will treat them as comments and ignore them when compiling programs. The directives are not case sensitive. The syntax of the directives is:

*# document directive

It is a good idea to place the directives near the beginning of the main program file so that the Documenting Wizard encounters the instruction when it begins analyzing.

The Documenting Wizard directives are described below.

  • *# document ACTIONCHARS "abcdef"
    By default, when the wizard creates an Action Diagram or a Tree Diagram, the wizard uses six characters that appear as lines and square corners when viewed under ASCII code page 1250 or under ANSI code page 1252 in FoxFont. Not all the characters map to line characters when viewed under other code pages. The six default characters and their corresponding FoxFont characters are listed below as a, b, c, d, e, and f.
    abcdef Default Chr( ) Value As viewed in FoxFont
    a 32 (space)
    b 196
    c 179
    d 218
    e 192
    f 195

Tip   When using other code pages, insert the following code in your main program file to ensure that the lines in your diagrams map to line-like characters (the first character of the string enclosed in quotes is a space):

*# document ACTIONCHARS " -|+++"

Note   For a list of supported code pages, see Code Pages Supported by Visual FoxPro.

  • *# document XREF cMode
    Enables cross-referencing of variables. The default is ON.

    cMode Description
    ON Enables cross-referencing of variables
    OFF Disables cross-referencing of variables
    SUSPEND Disables cross-referencing of variables in the current file until the Documenting Wizard encounters the next instance of:

    *# document XREF ON

  • *# document EXPANDKEYWORDS cMode
    Enables the expansion of keywords. For example, "DEFI WIND" would be expanded to "DEFINE WINDOW." The default is OFF.

    Caution   Not all keywords in Visual FoxPro begin with a unique string of four characters. For example, "REPL" could be short for "REPLACE" or "REPLICATE." Be careful if you include this directive and choose to overwrite existing files.

    cMode Description
    ON Enables keyword expansion
    OFF Disables keyword expansion
    SUSPEND Disables keyword expansion in the current file until the next instance of:

    *# document EXPANDKEYWORDS ON

  • *# document XREFKEYWORDS cMode
    This directive corresponds to the Cross-Reference Keywords option on "Step 6 – Finish" in the Documenting Wizard. The default is OFF.

    cMode Description
    ON Enables cross-referencing of keywords
    OFF Disables cross-referencing of keywords
    SUSPEND Disables cross-referencing of keywords in the current file until the next instance of:

    *# document XREFKEYWORDS ON

  • *# document ARRAYBRACKETS cMode
    The default is OFF.

    cMode Description
    ON The Documenting Wizard assumes that square brackets are used for arrays and that parentheses are used for functions and methods.
    OFF The Documenting Wizard treats both square brackets and parentheses as arrays.
  • *# document ACTIONINDENTLENGTH nSpace
    nSpace is the number of character spaces that you want the Documenting Wizard to use for indentation. The minimum value allowed is 2.

See Also

Documenting Wizard | Wizards Overview |Code Pages Supported by Visual FoxPro | Documenting Wizard: Step 1 - Choose Source File | Documenting Wizard: Step 2 - Set Capitalization | Documenting Wizard: Step 3 - Set Indentation | Documenting Wizard: Step 4 - Add Headings | Documenting Wizard: Step 5 - Select Reports | Documenting Wizard: Step 6 - Finish