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

  • Thread starter Thread starter dE_logics
  • Start date Start date
  • Tags Tags
    Data Type
Join the discussion
Registration is free. Start your own thread to ask a follow-up.
4 replies · 2K views
dE_logics
Messages
742
Reaction score
0
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?
 
Physics news on Phys.org
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.
 
So it actually has no use apart from making the program machine readable.
 
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.