comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Is there any conventions style programming IDL?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Is there any conventions style programming IDL? [message #39209 is a reply to message #39088] Mon, 26 April 2004 13:32 Go to previous message
Dick Jackson is currently offline  Dick Jackson
Messages: 347
Registered: August 1998
Senior Member
"Dick Jackson" <dick@d-jackson.com> wrote in message
news:KNcic.223564$Pk3.78786@pd7tw1no...
>
> For those who are wondering (like I was) "Hungarian Notation" refers
to
> what Mike Schienle suggests, as in:
>
> Variables of type Byte shall begin with the letter "b"
>
> A full description of this and other aspects of naming identifiers is
> this article at Microsoft's MSDN site:
>
> http://tinyurl.com/ezmr
>
> I agree with Mike Wallace in general, but I find it useful to identify
> two kinds of identifiers in special ways: objects and pointers. I do
> this since we work with them in ways quite different from the other
> types. For example, when I see variable pInfo, the 'p' reminds me that
I
> need to dereference with '*' before using the thing itself.
>
> Just my CAD 0.02 (two Canadian cents' worth)

Mirko Vukovic asked me to forward this to the group:

-----

I find Hungarian very usefull in designating the ``role'' of variables.
That is one level higher than type. Consider the foolwing
multiple-usage of File and FileName. The hungarian notation allows (me)
a simple naming convention.

vFileName=['file.1','file.2','file.3'...]
cFile=n_elements(vFileName)
for iFile=0,cFile-1 do begin
FileName=vFileName[iFile]
...

In the above, c stands for count, i for index, v for vector. I even use
it in combinations, such as

viGoodPixel=where(mPixel eq ...,cGoodPixel)

Now, vi is a vector of pixels, and cGoodPixel is the count of good
pixels. And so it goes.

Dr.Ko

-----
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Check marks on context sensitive menus
Next Topic: WHERE Command Bug with Floating underflow

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 08:25:14 PDT 2025

Total time taken to generate the page: 0.87917 seconds