Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Use of 'l' or 'L' and 'u' or 'U' infront of the right data type.

  1. Sep 7, 2009 #1
    We put a 'u' in front of an unsigned value or 'l' infront of a long value...etc...different for different datatypes, but what's the utility of this?
     
  2. jcsd
  3. Sep 7, 2009 #2
    Sounds like a form of Hungarian notation. It's supposed to remind you of the type of the data. I've read a good argument that Hungarian notation as it was originally intended ("Applications Hungarian") was a good idea, but Hungarian notation adapted to denote data types only ("Systems Hungarian") was not.
     
  4. Sep 8, 2009 #3
    So it actually has no use apart from making the program machine readable.
     
  5. Sep 8, 2009 #4

    DavidSnider

    User Avatar
    Gold Member

    It's for making the program HUMAN readable.

    Hungarian notation is somewhat useful when you don't have an IDE to help you identify potential typing errors or remind you what the scope of a variable is.

    It's somewhat frowned upon these days, especially the microsoft variety of m_intPosX.
     
  6. Sep 9, 2009 #5
    Oh sorry, human readable :rofl:
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Use of 'l' or 'L' and 'u' or 'U' infront of the right data type.
Loading...