Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!mcnc!rti!bcw From: bcw@rti.UUCP (Bruce Wright) Newsgroups: comp.sys.ibm.pc Subject: Re: FORTRANish C (was Re: Hungarian C Conventions) Summary: Also a common MACRO ASSEMBLER technique Message-ID: <2887@rti.UUCP> Date: 13 Apr 89 15:42:33 GMT References: <47015@linus.UUCP> <45900220@uxe.cso.uiuc.edu> <2701@garth.UUCP> Organization: Research Triangle Institute, RTP, NC Lines: 35 In article <2701@garth.UUCP>, phipps@garth.UUCP (Clay Phipps) writes: > In article <1415@blake.acs.washington.edu>, > djo7613@blake.acs.washington.edu (Dick O'Connor) writes: > > > >The article was in the March 14, 1989 (Volume 8, Number 5) issue of > >PC Magazine, Page 329. Author: Charles Petzold, of course ! > > Good grief, folks ! I read Petzold's article last night, and > what he describes is just a glorification of FORTRAN naming conventions. This sort of thing is also quite common in various assembler programming environments. For example, on VMS (one of several places where I do a lot of device driver hacking), most of the system-level global names have the general syntax: xxx$l_something - for a longword (32-bit) variable xxx$w_something - for a word (16-bit) variable xxx$b_something - for a byte variable xxx$k_something - for the size of something xxx$v_something - for a bit number or general constant xxx$m_something - for a bit mask (note: xxx = the mnemonic of the facility or data structure having the named object or attribute, often but not always 3 characters). There are more but this gives the flavor of the naming convention. It can make a big difference where you have to use assembler language and can't remember whether some miscellaneous field is a word or a longword (it's not always obvious from context). But I agree that the convention makes C look more like a low-level language. It really only becomes necessary when you are using a language which is so lax about typing (someone I know once said that C only has "pretend" types :-) Bruce C. Wright