当前位置:文档之家› PowerBuilder程序开发规范

PowerBuilder程序开发规范

PowerBuilder程序开发规范一、系统对象的命名
二、窗口控件命名
三、变量命名
说明:对于变量的命名规则中的x
四、其他命名
五、程序注释要求
要求每个事件、函数、变量等都必须有注释。

注释与代码的比例最少应达到1:3。

在每段程序的前方写明代码的作用、逻辑等。

每个变量要求写出其功能。

事件、函数代码开头注释模版为:
/********************************************************************
功能:
参数:
返回:
作者:
创建:1999.09.21
修改:2000.09.21
********************************************************************/
///////////////////////////////////////////////////////////////////// //
// function: of_updatechecks
//
// access: protected
//
// arguments:
// apo_control[] the array of object for which the checks need to be // performed.
//
// returns: integer
// 1 = updates were found
// 0 = no changes to update were found
// -1 = accepttext error
// -2 = updatespending error was encountered
// -3 = validation error was encountered
//
// description: perform accepttext, updatestpending and validation on // the objects.
//
///////////////////////////////////////////////////////////////////// 六、对象的命名及备注
每个对象备注中要有对象的功能及开发人。

七、系统固定按钮名称参考。

相关主题