PB Program Specification

Source: Internet
Author: User
Tags comments

Author: Xingda Computer technology company (www.study01job.com) Guo Baoli

I. Format of writing

A. Displays the hierarchy of nested structures using a layered indentation.

B. Inserts a blank line between the annotation segment and the program segment, as well as the different logical sections of the program.

C. Write only one statement per line, which should be written when scrolling is required.

Second, flow control

Flow control should first adhere to the PowerBuilder syntax specification and highlight nested hierarchies with hierarchical indentation, for example:

III. Annotations and format requirements

Comments are always added to a program where a general description is required or is not easily understood or misunderstood. Note language should be concise, easy to understand and accurate, the choice of languages used in Chinese, if there is difficulty in entering or special needs can also be used in English.

Annotation principle:

A. Comments on functions or procedures

(1). In the function head must explain function and parameter (value parameter, variable parameter);

(2). In the main part of the function, if the algorithm is complex, the algorithm structure should be explained by means of annotation;

(3). A function has requested global resources and may cause resource constraints to be noted (such as memory and file handles, etc.);

(4). The function has side effects must be marked in a very eye-catching way (such as add!).

B. Comments on statements

(1). To respond to difficult to understand the expression of branching conditions annotated;

(2). The difficult to understand cycle, should indicate the export conditions (have goto procedures should also explain the entrance conditions);

(3). If the function is too long, its statement should be summarized according to the functional section of realization.

C. Comments on constants and variables

After the constant name is declared, the name should be properly commented, and the main point of the note is:

(1). The meaning of the saved value (required);

(2). The range of lawful values (optional);

(3). The global volume needs to be fully explained by the above points.

D. Development of annotations to the object

Each developer adds comments for their own windows, menus, data windows, data pipelines, and user objects, with the following points:

(1). The purpose of the callout object;

(2). The person making the annotation object;

(3). Marking time or modification time.

The specific format requirements are as follows:

1. Before the window open event should be described

/* ======================================================= */

Window in English name:

Window function:

Author:

Date:

/* ======================================================= */

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.