Re: The Elements of Informix-4gl Style
Posted in 1992
Path: emory!sol.ctr.columbia.edu!zaphod.mps.ohio-state.edu!think.com!yale.edu!yale!mintaka.lcs.mit.edu!spdcc!dirtydog.ima.isc.com!ispd-newsserver!kodak!music!amiano From: amiano@music.Kodak.COM (Mitch Amiano) Newsgroups: comp.databases.informix Keywords: structure, coding Message-ID: <1992Mar13.162109.9076@kodak.kodak.com> Date: 13 Mar 92 16:21:09 GMT References: <10208@gollum.twg.com> Sender: amiano@music (Mitch Amiano) Organization: Eastman Kodak Co., Rochester, NY In article <10208@gollum.twg.com>, cauhape@twg.com (Jeff KB6TDU Cauhape) writes: |> I think we've taken the issue of capitalization and beaten it |> do death. Ditto with indentation. seconded |> I'd like to bring up the topic of global variables, records and |> procedure parameters. It's important to understanding such a site-local convention to have a legend which is obvious and apparent when looking over the code. The legend should tersly describe the nomenclature of identifiers. Keeping documentation somewhere else in handbooks or document files will lead to people forgetting the convention exists. Also - what might seem to be obvious or meaningful information associated with a convention may not be so obvious or meaningful to someone else. But I feel sticking by a convention can be worthwhile. One piece of information which I have found to be useful is the scope/type of an identifier. I use the following prefixes to assist: prefix ex meaning l lCustomer local variable or record g gCustomer global m mCustomer modular w wCustomer Window id for form Customer.per s sCustomer screen record in form Customer.per c cCustomer cursor for select * from customer |> 2. Use memnonic names. |> |> It's more clear what p_loop_counter does than p_k. Don't you mean 'Don't use mnemonic names ?' |> 3. Name things with the same style in ALL programs. Everything else in this post can be considered my opinion. But #3 reveals the issue - one can certainly apply a _bad_ style consistently, but it good style isn't worth much if it isn't consistentent. |> That's a start. Comments? I thought the rest of what you wrote was just good programming style, but isn't that getting off the topic ? :-) ---------------------------------------------------------------------------- | Mitch Amiano Current Work Phone: 716-477-3506 | | Software Contractor Address: amiano@music.kodak.com | | Rochester, NY "Unity is plural, and at a minimum two." | | 716-226-2024 - R. B. Fuller | ----------------------------------------------------------------------------