× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Beginning to sound like a broken record here but if you look at my trigger 
Mediator at www.think400.dk in downloads you will see plenty of examples of 
naming exported subprocedures. 

I start with XV or what ever for the subsystem. In this case, this is system 
utilities. I then add a unique four character value like ERRH or USPC or 
whatever so I end up with a service program name of XVERRH or XVUSPC. 

Then when I create any procedure that is exported, I put the four character on 
the front so

ERRH_Throw
USPC_CreateUserSpace
DYNL_LoadServiceProgram
MSGF_SendProgramMessage

This gives me several advantages. 

1. I know exactly which service program the function comes from. 
2. I can have the same actual name in two different functions but the prefix is 
different. 
3. I can simplify the procedure name. Like in ERRH_Throw. I don't need to say 
something like ERRH_ThrowAnExceptionMessage     because I know from the prefix 
that this service program is doing error handling. 

The other parts of this are the rest of the naming standards. For example. 

XVERRH     - Top Level. Instructions on creating the service program.
XVERRH_PR  - Exported prototypes
XVERRH_B   - Bindary
XVERRH_M01 - Throw error
XVERRH_M02 - Storage messages
XVERRH_M03 - ILE Condition Handlers.

Another example, I needed a service program for pricing at a previous job so

OEPRIC     - Top Level
OEPRIC_PR  - Export Prototypes
OEPRIC_B   - Bindary
OEPRIC_M01 - Implementation

PRIC_GetBasePrice
PRIC_GetCustomerPrice
PRIC_GetDiscountDetail

You could prefix with the whole 6 characters but don't know if that is 
necessary. 

You need to have standards for naming subprocedures but, you also need 
standards for naming service programs themselves, for naming prototypes, 
modules and the bindery. All pieces of the puzzle.  

The other piece is knowing what to group together. What things belong together 
in one service program. Then what things within a service program should be in 
a separate module. Comes down to grouping like things together. 
 
As far as internal procedures, I have just been giving them a name that makes 
sense lately. I was putting INT_ for internal but decided that was overkill. 

As I indicated, lots of example in download. Hope this helps. 



As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.