Jump to content
  • Advertisement
Sign in to follow this  

Prefixs

This topic is 4340 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have been looking through some of the ogre code and some other ones, and im not sure exaclty what each one means. Is there a list somewhere? The main ones are: m (memory?) r eg. Vector3& rkVector k eg. Vector3& rkVector f eg. const real fScalar etc. I am not sure why sometimes there used and sometimes there are absolutly no prefixs for a variable that seems almost exactly the same?

Share this post


Link to post
Share on other sites
Advertisement
The prefixes are there because the programmer decided to put them there. Some programmers/teams will use them while others won't; they don't mean anything to the compiler and are just part of the variable name.

There are no standard definitions for prefixes, they're entirely defined by the programmer(s), so those could mean anything.

Share this post


Link to post
Share on other sites
'm', 'k', and 'f' are typically used to indicate "member variable", "constant", and "float" respectively. I've never seen 'r' used before, but I suspect it means "reference".

Prefixing names with characters that signify type or scope is called "Hungarian notation". Some people like it, some people don't. It is a lot less useful now than it might have been 15 years ago.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!