Results 1 to 8 of 8

Thread: Naming Conventions - Variables

  1. #1

    Thread Starter
    Frenzied Member <ABX's Avatar
    Join Date
    Jul 2002
    Location
    Canada eh...
    Posts
    1,622

    Naming Conventions - Variables

    http://www20.brinkster.com/xous/NamingConvent.html

    I know M$ doesnt want us to use hugarian Notation but i like it, does this look right?

    does anyone know the prefix's for the ones im missing/ are any wrong?
    Tips:
    • Google is your friend! Search before posting!
    • Name your thread appropriately... "I Need Help" doesn't cut it!
    • Always post your code!!!! We can't read your mind!!! (well, at least most of us!)
    • Allways Include the Name and Line of the Exception (if one is occuring!)
    • If it is relevant state the version of Visual Studio/.Net Framwork you are using (2002/2003/2005)


    If you think I was helpful, rate my post
    IRC Contact: Rizon/xous ChakraNET/xous Freenode/xous

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    I use bol for Boolean..... dat for Dates....
    sint for Short Int
    That's all I've got to add....

    TG
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    i personally dont like hungarion notation..i do it like this:

    private vars -> _myVar
    public properties -> MyVar(that will point to _myVar)
    so i always know that ThisWord will point to _thisWord
    \m/\m/

  4. #4
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Originally posted by PT Exorcist
    i personally dont like hungarion notation..i do it like this:

    private vars -> _myVar
    public properties -> MyVar(that will point to _myVar)
    so i always know that ThisWord will point to _thisWord
    That is pretty much how I do it too. I never liked that hungarian notation.

  5. #5

    Thread Starter
    Frenzied Member <ABX's Avatar
    Join Date
    Jul 2002
    Location
    Canada eh...
    Posts
    1,622
    I got use to it and I dont like not using it

    makes debugging easier...
    Tips:
    • Google is your friend! Search before posting!
    • Name your thread appropriately... "I Need Help" doesn't cut it!
    • Always post your code!!!! We can't read your mind!!! (well, at least most of us!)
    • Allways Include the Name and Line of the Exception (if one is occuring!)
    • If it is relevant state the version of Visual Studio/.Net Framwork you are using (2002/2003/2005)


    If you think I was helpful, rate my post
    IRC Contact: Rizon/xous ChakraNET/xous Freenode/xous

  6. #6
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    If you hover over a variable it will show you the declared type. So I don't see how including it in the name is that helpful but that is just me. Really I don't think it matters what conventions you use as long as you are consistent and if you work in a group you all do the samething or work it out. That is what I like best about programming there is so many ways of doing the samething, plenty of room for style and choice.

  7. #7
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704
    Originally posted by PT Exorcist
    i personally dont like hungarion notation..i do it like this:

    private vars -> _myVar
    public properties -> MyVar(that will point to _myVar)
    so i always know that ThisWord will point to _thisWord
    That's the naming convention we use at my company also.
    Hungarian may have made more sense when using some basic programming editor like Pico on Unix, where you don't have Intellisense.

  8. #8
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    its funny as i dont know when and why i started using that convention..i never saw anyone using it so it came naturally (at least in me) but looks like everyone uses it..maybe its instinct of human race to use it that way
    \m/\m/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width