PowerBuilder programming variable naming specification and development considerations

zhaozj2021-02-11  255

PowerBuilder programming variable naming and development notes Author: Flow square Home: http: //liulee.myrice.com

Any control can be seen as a variable, mainly including objects, variables, and corresponding scope, each entity, should be seen from the name in that scope, what kind of basic information is made.

1, object naming

Powerbuilder, the object's naming is generally used as the following prefix:

Prefix Object

-------------------------------------------------- -------------

DW_ DataWindows

DDDW_DPDowndataWinows

f_ functions

m_ menus

P_ pipelines

S_ Structures

u_ userobjects

W_ windows

2, the control is named

In the PowerBuilder window, the naming of the control generally uses the following prefix:

Prefix Control

-------------------------------------------------- -------------

CBX_ Checkbox

CB_CommandButton

DW_ DataWindow

DDLB_DOPDOWNLISTBOX

EM_ Editmask

GR_ graph

GB_ GroupBox

HSB_ hscrollbar

LN_ line

LB_ listbox

MLE_ MULTILINEEDIT

OLE_ OLE 2 0

OCX_ OCX

Oval_ Oval

P_ Picture

PB_ PictureButton

RB_ Radiobutton

r_ reccTangle

RR_ RoundRectangle

SLE_ SINGLINEEDIT

ST_ statictext

UO_ User Object

VSB_ vscrollbar

3, variable naming:

-------------------------------------------------- -------------

1), the scope is named

Prefix Scope

-------------------------------------------------- -------------

G_global

S_ Shared

i_ instance

l_ local

2), variable type prefix

Prefix DataType

-------------------------------------------------- -------------

B_ boolean

BLOB_BLOB

D_ Double

Date_ Date

Dec_ Decimal

DT_ DateTime

i_ integer

l_ long

S_ string

T_ Time

UI_ undisgned int

UL_ undisgned long

TR_ Transaction Object

Do_ DragObject

DWC_ DataWindowChild

NVO_ NONVISULOBJECT

4, function name

Prefix Scope

-------------------------------------------------- -------------

GF_ Global Function

WF_ WINDOW FUNCTION

MF_ Menu Function

UF_ UserObject Function

转载请注明原文地址:https://www.9cbs.com/read-3758.html

New Post(0)