Using Comments Effectively

 <  Day Day Up  >  

Most programming and development environments give you some way to add comments to a system. Comments are descriptive information that you, the developer, supply throughout the system to clarify the meaning and usage of programming constructs. Previous versions of FileMaker allowed you to add comments to scripts. FileMaker 7 includes several additional features to enable developers to include comments throughout a system. The following sections look at these in detail.

Adding Comments for Fields

graphics/new_icon.jpg

In FileMaker 7, you can now add a comment for each field in the Fields tab of the Define Database dialog box. The comments can each be up to 30,000 characters in length. The selected field's comment is displayed beneath the field name . View all comments by clicking the Options/Comments column header at the top of the field list. Field comments are included in the Database Design Report (covered later in this chapter) and are also accessible via the Get(FieldComment) function. Figure D.1 shows an example of field comments.


Figure D.1. Field comments can be displayed in the Fields tab of the Define Database dialog.
graphics/ap04fig01.gif

Commenting Within Formulas

graphics/new_icon.jpg

Formulas are defined in various places, including calculation fields, field validation, and some script steps such as If , Set Field , and Replace Field Contents . FileMaker 7 now allows comments within formulas. C-style and C++-style comments are both supported. C-style comments begin with the characters /* and end with the */ characters. C-style comments can span multiple lines and can be nested within other comments. C++-style comments begin with // and continue through the end of the line, as in the following example:


 

 /* concatenate author's name in the form last, first     example:  Smith, John    */ name_last & Case(WordCount(name_first) and WordCount(name_last); ", ")  //don't include comma if either field is empty & name_first 

Scripts

The Comment script step can be added anywhere within a script. Up to 30,000 characters may be included in the dialog box. Within ScriptMaker, the Comment script step appears in bold text, preceded by a # character. When a script is printed, the Comment script step is in italic.

Adding Descriptions in the Accounts & Privileges Dialog

graphics/new_icon.jpg

Accounts, privilege sets, and extended privileges can each have associated descriptions. Enter a description when defining these items in the Accounts & Privileges dialog box. Up to 30,000 characters may be included for each. The descriptions appear in their respective lists and are also included in the Database Design Report.


 <  Day Day Up  >  


QUE CORPORATION - Using Filemaker pro X
QUE CORPORATION - Using Filemaker pro X
ISBN: N/A
EAN: N/A
Year: 2003
Pages: 494

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net