• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 745
  • Last Modified:

coding conventions

dear frineds
Hi!I am sorry  to all of u as i wam writing a question related to dveloper 2000. Can any one help me
as i want the coding conventions for d2k. I am tored of searching through site. ]
u can directly send me on
1 Solution
Here is some portion of what we had followed :

Object name      Prefix
Block            BLK_description
push button      PBT_desciption
text_item        TXT_description
radio button     RBT_description
list item        LST_description
form name        FRM_description
canvas name      CAN_description
window name      WIN_description
LOV              LOV_description
Record group     RGP_description
procedures       SP_description
functions        SF_description
packages         PKG_description

Hope this helps. Best wishes.

pushpakAuthor Commented:
dear friend
hi! This coding convention for the controls i will be dropping on the form. I want to name the control thoroughly so as whether it is bin variable or not .
from the name  i should know what are the values the control can take like integer,float,date or varchar etc.
Will it be possible for u to give me a elaborated  codibng convention .
Also the global variable and its scope.

Ok here goes , hope its of help.
Best wishes.


Variables shall be prefixed with :

lvar_       : local varchar2
lint_       : local integer
lflt_       : local float
ldat_       : local date
lbul_       : local boolean

gvar_       : global varchar2
gint_       : global integer
gflt_       : global float
gdat_       : global date
gbul_       : global boolean

ivar_       : input parameter varchar2
iint_       : input parameter integer
iflt_       : input parameter float
idat_       : input parameter date
ibul_       : input parameter boolean

ovar_       : output parameter varchar2
oint_       : output parameter integer
oflt_       : output parameter float
odat_       : output parameter date
obul_       : output parameter boolean

iovar_       : input output parameter varchar2
ioint_       : input output parameter integer
ioflt_       : input output parameter float
iodat_       : input output parameter date
iobul_       : input output parameter boolean

C_           : cursors

excp_        : user defined exceptions

pltab_       : pl/sql table
rec_         : record type

sp_          : stored procedures
sf_          : stored functions
pkg_         : packages

syn_         : synonyms
vw_          : views
tab_         : tables
seq_         : sequences

For Oracle Forms 4.5  :                                                                                                                                                    

Base Table Blocks                                                                                                                                    
The block name should be the short name or abbreviations of the base table it uses, followed by an underscore and  'BLK'.                            
When more than 1 block has same table name use sequence number along with the abbreviated table name followed by 'BLK'.                              
 Block with base table 'emp' should be named as 'EMP_BLK'                                                                                            
 If there are 2 blocks with same base table Emp then the first block will have the name 'EMP_BLK1' followed by  'EMP_BLK2'.                          
Control Blocks                                                                                                                                      
The Control block should always have the name 'CTRL_BLK'.  If there are more than one control block then use a sequence number along with 'CTRL_BLK'
The first control block will have name 'CTRL_BLK1' followed by       'CTRL_BLK2' and so on                                                                
Base Table Block Fields                                                                                                                              
Fields of base table block will have the same names as table column names.                                                                          
Control Block Fields                                                                                                                                
Fields should be prefixed with the field type along with object type followed by '_'.                                                                
The field types are as follows:                                                                                                                      
      D       :  For display fields                                                                                                                
      H       :  For hidden fields                                                                                                                
      E      :  For entry fields                                                                                                                  
      L      :  For local variables                                                                                                              
Example:   A field MONTH_NO, which is an entry field on a Control Block, should be named as E_MONTH_NO.    

Push button      
Shall be prefixed with  PBT_ in Uppercase and followed by the name.    
Shall be prefixed with  TXT_ in Uppercase and followed by the datatype and then by the name.  EG : TXT_VAR_NAME , a text item taking in names in varchar2
the others shall be : TXT_INT_ for integers,TXT_FLT_ for floats,TXT_DAT_ for dates , TXT_CHR_  for characters

Radio button    
Shall be prefixed with  RBT_ in Uppercase and followed by the name.          

List item        
Shall be prefixed with  LST_ in Uppercase and followed by the name.          

Form name        
Shall be prefixed with  FRM_ in Uppercase and followed by the name.          
Visual Attributes                                                                                                                                    
Visual attributes must be prefixed with  'VA_' in Uppercase and followed by the name.                                                                
Property Classes                                                                                                                                    
Property Classes must be prefixed with  'PC_' in Uppercase and followed by the name.                                                                
Record Groups                                                                                                                                        
Record groups must be prefixed with  'RG_' in Uppercase and followed by the name.                                                                    
Canvas-Views must be prefixed with  'CV_' in Uppercase and followed by the name.                                                                    
Windows must be suffixed with '_WIN' in Uppercase.    

Oracle Reports 2.5

Boilerplate must be prefixed with B_      
Field must be prefixed with F_ and followed by the source item name
Frame must be prefixed with M_      
Repeating Frame      must be prefixed with R_
Formula Column      must be prefixed with CF_      
Group      must be prefixed with G_      
Placeholder Column must be prefixed with CP_      
Query must be prefixed with Q_      
Summary Column must be prefixed with CS_      
User Parameter must be prefixed with RP_      and followed by the column name with which it is associated.
Hi pushpak,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days.  I will suggest to:

    Accept hemlatha_rk's comment(s) as an answer.

pushpak, if you think your question was not answered at all or if you need help, you can simply post a new comment here.  Community Support moderators will followup.

Please do not accept this comment as an answer!

EXPERTS: Your input for closing recommendations are REQUESTED.
DanRollins -- EE database cleanup volunteer
Force accepted

** Mindphaser - Community Support Moderator **
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now