Variable Naming Standards In PowerBuilder
Variable naming standards for standard variables declared within the Powerscript environment. This includes variables declared in dialog windows such as global and instance variables. The object name should be typed using Camel Case. Camel case is a standard used to aid readability in scripts, the first letter of each new word in the variable name should be in upper case. The scope and prefix should always be in lower case
Syntax Conventions | ||
[scope][prefix]_[name] | ||
Scope Qualifiers | ||
Scope | Prefix | Example |
Argument | a | al_NameId |
Global | g | gs_Name |
Instance | i | ii_Count |
Local | l | ls_Foo |
Shared | s | si_Number |
Standard DataType Prefixes | ||
Data Type | Prefix | Example |
Any | a | la_Raw |
Blob | blb | ablb_Image |
Boolean | b | lb_Exit |
Character | c | lc_Name |
Date | d | ld_BirthDate |
DateTime | dt | ldt_Wreck |
Decimal | dec | ldec_Salary |
Double | db | gdb_OverTime |
Integer | i | li_Count |
Long | l | ll_RowCount |
Real | r | sr_Illusion |
String | s | ls_Bean |
Time | tm | itm_MrWolf |
Unsigned Integer | ui | lui_Handle |
Unsigned Long | ul | gul_Ken |
Standard Object DataType Prefixes | ||
Object Type | Prefix | Example |
Application | app | gapp_PBDelta |
ArrayBounds | ab | lab_Bound |
CheckBox | cbx | icbx_Male |
ClassDefinition | cldef | lcldef_Object |
ClassDefinitionObject | cldefo | lcdefo_ThatObject |
CommandButton | cb | lcb_Cancel |
Connection | cn | lcn_Known |
ConnectionInfo | cni | lcni_ServerInfo |
ConnectObject | cno | scno_ConObj |
ContextInformation | cxinfo | lcxinfo_ObjContext |
ContextKeyword | cxk | lcxk_TheKey |
CPlusPlus | cpp | lcpp_CModule |
Datastore | ds | lds_StockData |
Datawindow | dw | ldw_Employee |
DatawindowChild | dwc | ldwc_States |
DragObject | drg | ldrg_ByTheHair |
DrawObject | drw | ldrw_PaintBrush |
DropDownListBox | ddlb | lddlb_States |
DropDownPictureListBox | ddplb | lddplb_StatesWithFlags |
dwObject | dwo | ldwo_Column |
DynamicDescriptionArea | dda | ldda_Execute |
DynamicStagingArea | dsa | ldsa_MyQuery |
EditMask | em | lem_PhoneNo |
EnumerationDefinition | enum | lenum_Cycle |
EnumerationItemDefinition | enumi | ienumi_Item |
Environment | env | lenv_System |
Error | err | gerr_Snarl |
ExtObject | exto | gexto_Outside |
Function_Object | fo | lfo_Function |
Graph | gr | lgr_Sales |
GraphObject | gro | lgro_Line |
GrAxis | grx | lgrx_Profit |
GrDispAttr | grda | igrda_Value |
GroupBox | gb | igb_Employee |
HScrollBar | hsb | ihsb_Percent |
iNet | inet | linet_Web |
InternetResult | ir | lir_Page |
Line | li | lli_Arrow |
ListBox | lb | llb_States |
ListView | lv | llv_Filenames |
ListViewItem | lvi | llvi_Item |
MailFileDescription | mfd | lmfd_Mail |
MailMessage | mm | lmm_Mail |
MailRecipient | mr | lmr_Mail |
MailSession | ms | lms_Session |
MDIClient | mdi | lmdi_Frame |
Menu | m | lm_Menu |
MenuCascade | mc | lmc_WaterFall |
Message | msg | lmsg_Whisper |
MultiLineEdit | mle | lmle_Text |
NonVisualObject | nvo | lnvo_Invisible |
OLEControl | oc | loc_Bulls |
OLECustomControl | occ | locc_Dial |
OLEObject | oo | loo_Ghost |
OLEStorage | ostg | gostg_WordFile |
OLEStream | ostm | lostm_River |
OMControl | omc | iomc_Temp |
OMCustomControl | omcc | lomcc_Dial |
OMEmbeddedControl | omec | lomec_Micro |
OMObject | omo | iomo_Bob |
OMStorage | omstg | somstg_Drive |
OMStream | omstm | lomstm_Mersey |
Oval | ov | lov_Circle |
PBtoCPPObject | pb2cpp | lpb2cpp_Quad |
Picture | p | lp_Smile |
PictureButton | pb | lpb_Click |
PictureListBox | plb | lplb_Drives |
Pipeline | pl | lpl_OilandGas |
Powerobject | po | lpo_Source |
ProfileCall | prc | lprc_Face |
ProfileClass | prcl | lprcl_Room |
ProfileLine | prl | iprl_Bob |
ProfileRoutine | prr | lprr_Cat |
Profiling | pr | lpr_Outline |
RadioButton | rb | lrb_Male |
Rectangle | rec | irec_Tum |
RemoteObject | ro | iro_Employee |
RichTextEdit | rte | lrte_Script |
RoundRectange | rr | lrr_Lion |
ScriptDefinition | sdef | lsdef_Mycode |
Service | srv | lsrv_Charge |
SimpleTypeDefinition | std | istd_MyType |
SingleLineEdit | sle | lsle_Name |
StaticText | st | lst_Prompt |
Structure | str | lstr_Data |
SystemFunctions | sf | lsf_Bay |
Tab | tab | ltab_Strip |
Timing | tmg | ltmg_Clock |
TraceActivityNode | tran | ltran_Node |
TraceBeginEnd | trbe | ltrbe_Start |
TraceError | tre | ltre_Error |
TraceFile | trf | itrf_TraceFile |
TraceGarbageCollect | trgc | itrgc_Call |
TraceLine | trln | strln_Rope |
TraceObject | tro | ltro_Bob |
TraceRoutine | trr | ltrr_Tiger |
TraceSQL | trsql | ltrsql_MySQL |
TraceTree | trt | ltrt_Birch |
TraceTreeError | trte | ltrte_Err |
TraceTreeGarbageCollect | trtgc | ltrtgc_Trash |
TraceTreeLine | trtl | ltrtl_String |
TraceTreeNode | trtn | ltrtn_Kilt |
TraceTreeObject | trto | ltrto_Trace |
TraceTreeRoutine | trtr | ltrtr_BobGrimmer |
TraceTreeUser | trtu | ltrtu_User |
TraceUser | tru | ltru_Blue |
Transaction | tr | ltr_Trans |
Transport | tp | ltp_Server |
Treeview | tv | ltv_Directory |
TreeviewItem | tvi | ltvi_Node |
TypeDefinition | typdef | ltypdef_Details |
UserObject | uo | luo_Control |
VariableCardinalityDefinition | vcd | lvcd_Type |
VariableDefinition | vd | lvd_Sore |
VerticalScrollBar | vsb | lvsb_Amount |
Window | w | w_PleaseWait |
WindowObject | wo | lwo_WomanElement |
DataWindow Type Modifiers | ||
Object Source | Prefix | Example |
SQL | sq_ | d_sql_customer |
External | ex_ | d_ex_input |
Stored Procecdure | sp_ | d_sp_clients |
DataWindow Presentation Modifiers | ||
Presentation Style | Prefix | Example |
Composite | cm | d_sq_cm_orders |
Crosstab | cr | d_ex_cr_summary |
Freeform | ff | d_sp_ff_order_entry |
Graph | gh | d_sp_gh_profits |
Grid | gr | d_sq_gr_excel |
Group | gp | d_ex_gp_customer |
Label | lb | d_sq_lb_mailshot |
N-Up | nu | d_sq_nu_news |
OLE 2 | ole | d_sq_ole_seats |
Rich Text | rt | d_sq_rt_chaseletter |
Tabular | tb | d_sq_tb_numbers |
Get From pbdr.com
Good Luck!