× 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.






Steve,

I like your suggestion a lot. ItStat_Open, ItStat_Closed... are easy to 
understand. I don't know anything about your application, but I already feel I 
understand a part of it. Impressing.

Cheers.

--
Antoine CONTAL



                                                                                
                                                       
                                                                                
                                                       
                                                Pour :   RPG programming on the 
AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>                
                                                cc :                            
                                                       
                                                Objet :  Re: Long Constant 
Names                                                       
             Steve Richter                                                      
                                                       
             <stephenrichter@xxxxxxxxx>                                         
                                                       
             Envoyé par :                                                       
                                                       
             rpg400-l-bounces@xxxxxxxxxxxx                                      
                                                       
                                                                                
                                                       
                                                                                
                                                       
             28/12/2004 14:46                                                   
                                                       
             Veuillez répondre à RPG                                            
                                                       
             programming on the AS400 /                                         
                                                       
             iSeries                                                            
                                                       
                                                                                
                                                       
                                                                                
                                                       




On Tue, 28 Dec 2004 11:24:52 +0100, antoine.contal@xxxxxxx
<antoine.contal@xxxxxxx> wrote:
>
>
> Hi group,
>
> I'm having an argument with the team that choose our shop's coding style 
> conventions. I'd like to have your opinion on the subject.
>
> The heart of the matter lies in this kind of constant declaration:
>
> DwwAppStateUpdFailMsg...
> D                 C                   '...'
>
> (ww is a prefix we have to add in front of variables and constants, to 
> differentiate them from file fields)
>
> The convention team says this name is too long. They want everybody to keep 
> their names within the 15-character limit -- indeed, 13 meaningful characters 
> after you add the two-character prefix.
>
> I think this name is already on the short side. Using so many abbreviations 
> won't make newcomers' work any easier. Still, isn't it more readable than 
> wwASUFM for instance?
>
> Did anyone already have this argument? What were the decisive factors and 
> what did you choose in the end?

long name.  I try to organize the long name to make it meaningful
within the application as a whole.

all constants start with "con"

use a "_" character to group sets of constants.  kind of the
equivalent of the enum in c++:
    conItStat_Open
    conItStat_Closed
    conItStat_Ready

where "con" means constant
"itstat" is a field name in the database
what follows the "_" are the meaningful names of each permitted value
for that field.

-Steve
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l

Les informations contenues dans ce message sont confidentielles et peuvent 
constituer des informations privilegiees. Si vous n etes pas le destinataire de 
ce message, il vous est interdit de le copier, de le faire suivre, de le 
divulguer ou d en utiliser tout ou partie. Si vous avez recu ce message par 
erreur, merci de le supprimer de votre systeme, ainsi que toutes ses copies, et 
d en avertir immediatement l expediteur par message de retour.
Il est impossible de garantir que les communications par messagerie 
electronique arrivent en temps utile, sont securisees ou denuees de toute 
erreur ou virus. En consequence, l expediteur n accepte aucune responsabilite 
du fait des erreurs ou omissions qui pourraient en resulter.
--- ----------------------------------------------------- ---
The information contained in this e-mail is confidential. It may also be 
legally privileged. If you are not the addressee you may not copy, forward, 
disclose or use any part of it. If you have received this message in error, 
please delete it and all copies from your system and notify the sender 
immediately by return e-mail.
E-mail communications cannot be guaranteed to be timely secure, error or 
virus-free. The sender does not accept liability for any errors or omissions 
which arise as a result.
$!4$!



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.