Variable Naming Standards In PowerBuilder

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
ScopePrefixExample
Argumentaal_NameId
Globalggs_Name
Instanceiii_Count
Locallls_Foo
Sharedssi_Number



Standard DataType Prefixes
Data TypePrefixExample
Anyala_Raw
Blobblbablb_Image
Booleanblb_Exit
Characterclc_Name
Datedld_BirthDate
DateTimedtldt_Wreck
Decimaldecldec_Salary
Doubledbgdb_OverTime
Integerili_Count
Longlll_RowCount
Realrsr_Illusion
Stringsls_Bean
Timetmitm_MrWolf
Unsigned Integeruilui_Handle
Unsigned Longulgul_Ken



Standard Object DataType Prefixes
Object TypePrefixExample
Applicationappgapp_PBDelta
ArrayBoundsablab_Bound
CheckBoxcbxicbx_Male
ClassDefinitioncldeflcldef_Object
ClassDefinitionObjectcldefolcdefo_ThatObject
CommandButtoncblcb_Cancel
Connectioncnlcn_Known
ConnectionInfocnilcni_ServerInfo
ConnectObjectcnoscno_ConObj
ContextInformationcxinfolcxinfo_ObjContext
ContextKeywordcxklcxk_TheKey
CPlusPluscpplcpp_CModule
Datastoredslds_StockData
Datawindowdwldw_Employee
DatawindowChilddwcldwc_States
DragObjectdrgldrg_ByTheHair
DrawObjectdrwldrw_PaintBrush
DropDownListBoxddlblddlb_States
DropDownPictureListBoxddplblddplb_StatesWithFlags
dwObjectdwoldwo_Column
DynamicDescriptionAreaddaldda_Execute
DynamicStagingAreadsaldsa_MyQuery
EditMaskemlem_PhoneNo
EnumerationDefinitionenumlenum_Cycle
EnumerationItemDefinitionenumiienumi_Item
Environmentenvlenv_System
Errorerrgerr_Snarl
ExtObjectextogexto_Outside
Function_Objectfolfo_Function
Graphgrlgr_Sales
GraphObjectgrolgro_Line
GrAxisgrxlgrx_Profit
GrDispAttrgrdaigrda_Value
GroupBoxgbigb_Employee
HScrollBarhsbihsb_Percent
iNetinetlinet_Web
InternetResultirlir_Page
Linelilli_Arrow
ListBoxlbllb_States
ListViewlvllv_Filenames
ListViewItemlvillvi_Item
MailFileDescriptionmfdlmfd_Mail
MailMessagemmlmm_Mail
MailRecipientmrlmr_Mail
MailSessionmslms_Session
MDIClientmdilmdi_Frame
Menumlm_Menu
MenuCascademclmc_WaterFall
Messagemsglmsg_Whisper
MultiLineEditmlelmle_Text
NonVisualObjectnvolnvo_Invisible
OLEControlocloc_Bulls
OLECustomControlocclocc_Dial
OLEObjectooloo_Ghost
OLEStorageostggostg_WordFile
OLEStreamostmlostm_River
OMControlomciomc_Temp
OMCustomControlomcclomcc_Dial
OMEmbeddedControlomeclomec_Micro
OMObjectomoiomo_Bob
OMStorageomstgsomstg_Drive
OMStreamomstmlomstm_Mersey
Ovalovlov_Circle
PBtoCPPObjectpb2cpplpb2cpp_Quad
Pictureplp_Smile
PictureButtonpblpb_Click
PictureListBoxplblplb_Drives
Pipelinepllpl_OilandGas
Powerobjectpolpo_Source
ProfileCallprclprc_Face
ProfileClassprcllprcl_Room
ProfileLineprliprl_Bob
ProfileRoutineprrlprr_Cat
Profilingprlpr_Outline
RadioButtonrblrb_Male
Rectanglerecirec_Tum
RemoteObjectroiro_Employee
RichTextEditrtelrte_Script
RoundRectangerrlrr_Lion
ScriptDefinitionsdeflsdef_Mycode
Servicesrvlsrv_Charge
SimpleTypeDefinitionstdistd_MyType
SingleLineEditslelsle_Name
StaticTextstlst_Prompt
Structurestrlstr_Data
SystemFunctionssflsf_Bay
Tabtabltab_Strip
Timingtmgltmg_Clock
TraceActivityNodetranltran_Node
TraceBeginEndtrbeltrbe_Start
TraceErrortreltre_Error
TraceFiletrfitrf_TraceFile
TraceGarbageCollecttrgcitrgc_Call
TraceLinetrlnstrln_Rope
TraceObjecttroltro_Bob
TraceRoutinetrrltrr_Tiger
TraceSQLtrsqlltrsql_MySQL
TraceTreetrtltrt_Birch
TraceTreeErrortrteltrte_Err
TraceTreeGarbageCollecttrtgcltrtgc_Trash
TraceTreeLinetrtlltrtl_String
TraceTreeNodetrtnltrtn_Kilt
TraceTreeObjecttrtoltrto_Trace
TraceTreeRoutinetrtrltrtr_BobGrimmer
TraceTreeUsertrtultrtu_User
TraceUsertrultru_Blue
Transactiontrltr_Trans
Transporttpltp_Server
Treeviewtvltv_Directory
TreeviewItemtviltvi_Node
TypeDefinitiontypdefltypdef_Details
UserObjectuoluo_Control
VariableCardinalityDefinitionvcdlvcd_Type
VariableDefinitionvdlvd_Sore
VerticalScrollBarvsblvsb_Amount
Windowww_PleaseWait
WindowObjectwolwo_WomanElement



DataWindow Type Modifiers
Object SourcePrefixExample
SQLsq_d_sql_customer
Externalex_d_ex_input
Stored Procecduresp_d_sp_clients



DataWindow Presentation Modifiers
Presentation StylePrefixExample
Compositecmd_sq_cm_orders
Crosstabcrd_ex_cr_summary
Freeformffd_sp_ff_order_entry
Graphghd_sp_gh_profits
Gridgrd_sq_gr_excel
Groupgpd_ex_gp_customer
Labellbd_sq_lb_mailshot
N-Upnud_sq_nu_news
OLE 2oled_sq_ole_seats
Rich Textrtd_sq_rt_chaseletter
Tabulartbd_sq_tb_numbers

Get From pbdr.com

Good Luck!

PassWords

About The Author

Leave A Comment?