Xref: utzoo comp.unix.programmer:1629 comp.lang.perl:5013 comp.std.internat:870 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!think.com!mintaka!bloom-beacon!eru!hagbard!sunic!mcsun!ukc!tcdcs!dce.ie!ch From: ch@dce.ie (Charles Bryant) Newsgroups: comp.unix.programmer,comp.lang.perl,comp.std.internat Subject: Re: Tools for manipulating message catalogs Message-ID: <1991Apr19.103905.486@dce.ie> Date: 19 Apr 91 10:39:05 GMT References: <1991Apr7.190119.24825@motcad.portal.com> <1991Apr8.191035.13836@alphalpha.com> <1991Apr10.122642.3991@dg-rtp.dg.com> Organization: Datacode Communications Ltd, Dublin, Ireland Lines: 31 In article <1991Apr10.122642.3991@dg-rtp.dg.com> eliot@dg-rtp.dg.com advocates the use of integer constants to identify messages in a message catalogue. Many others argue that symbolic names are better. I have never used such a thing, but I assume the choice is between MSG_NUMTOOBIG "Number too big" which is processed into: #define MSG_NUMTOOBIG 1 which then gets used in the program instead of the string, and 1 "Number too big" and then `1' gets used in the source. I hope everyone would agree that: a) symbolic names allow messages to get out of sync with the program (e.g. swap two lines in the message file, or add a new one in the wrong place) b) it is easy to forget or get confused over which number corresponds to each message Why not get the benefits of both? Have the input be: 1 MSG_NUMTOOBIG "Number too big" which produces the #defines as before. The programmer can now use a meaningful symbolic name, and cannot renumber without making the same change to the message file as would be necessary if no symbolic name is used. -- Charles Bryant (ch@dce.ie) -- If you like the opinions expressed in this message, they may be available for rent - contact your local sales office. Low interest deals available.