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

Home » Public Forums » archive » Is there any conventions style programming IDL?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Is there any conventions style programming IDL? [message #39109] Thu, 22 April 2004 03:29 Go to next message
Esteban Garc�a Cues is currently offline  Esteban Garc�a Cues
Messages: 7
Registered: April 2004
Junior Member
Hello,
I'm trying to standarize the way we programm in IDL , is there any
rules or conventions programming IDL ?

Thanks a lot.
Esteban Garc�a Cuesta
Re: Is there any conventions style programming IDL? [message #39202 is a reply to message #39109] Tue, 27 April 2004 03:18 Go to previous message
Esteban Garc�a Cues is currently offline  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
>
> -----
>
>
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: status of HDF5 *writing* support in IDL
Next Topic: array dimensions and subscripts

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

Current Time: Wed Oct 08 11:51:03 PDT 2025

Total time taken to generate the page: 0.00473 seconds