You are viewing a single comment's thread from:

RE: C0d3z Tips: The Importance of Properly Commenting Your Code!

in #steem8 years ago

I'm also a big fan of using the first letter of my variables to indicate what type that variable is. That way, if it's a large function, at a glance you can tell whether you need to convert a variable to a different type or not. I also like to name my variables such that I know roughly what their purpose is. If they are temporary, I usually suffix them with temp. ie:
int iTemp, iCount, iSum;
char cTemp, cChoice;
float fProduct, fSalary;
double dProduct, dSteemReceived;

Whatever method you use to define your variables, trying to be consistent can same you a lot of hassles.

Sort:  

@tippy vote

I've got a "somewhat standardized" means of declaring variables.. It certainly helps a ton!

@klye Cast a 100% Vote via @tippy

@tippy was at ~73.27% vote power at time of vote!
Vote power is Generated via RNG (Random Number Generator)

🤖 @Tippy - STEEM & SBD Text-to-Tip Service - by @KLYE 🤖
( click reply & type @tippy help for commands )