coding conventions

Posted on 2001-06-12
Medium Priority
Last Modified: 2008-03-06
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
Question by:pushpak
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 6184746
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.


Author Comment

ID: 6184987
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.


Accepted Solution

hemlatha_rk earned 200 total points
ID: 6185696
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.
LVL 49

Expert Comment

ID: 7061195
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

Expert Comment

ID: 7084839
Force accepted

** Mindphaser - Community Support Moderator **

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question