|
Re: Is there any conventions style programming IDL? [message #39202 is a reply to message #39109] |
Tue, 27 April 2004 03:18  |
Esteban Garc�a Cues
Messages: 7 Registered: April 2004
|
Junior Member |
|
|
"Dick Jackson" <dick@d-jackson.com> escribi� en el mensaje
news:4lejc.266086$oR5.38653@pd7tw3no...
> "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]
> ...
I agree with this, I find usefull to use letters for roles but not for types
because IDL is weak typed, altought sometimes
it's not necessary more than 10 rules or less of these
http://tinyurl.com/ezmr.
Thanks all of you, I almost have finished my Conventions Document. ;-)
Esteban Garc�a Cuesta
>
> 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
>
> -----
>
>
|
|
|