0
Why are there Ps after variables?
Does it make a difference if I omit them? For example: if (isMale (genderp) == true) { if (isAvailable (statusp) == true) return 850 + (driversGroup (experiencep))+ (ageGroup (agep)) + 10 + 40; else return 850 + (driversGroup (experiencep))+ (ageGroup (agep)) + 10; } else if (isAvailable (statusp) == true) return 850 + (driversGroup (experiencep))+ (ageGroup (agep)) + 40; else return 850 + (driversGroup (experiencep))+ (ageGroup (agep));
2 ответов
+ 10
depends. if you do not change the declaration of the various variable names then yes, it matters if you omit the p from these variables.
I am unsure why the original coder has included the p in these variable names. The code snippet you have provided does not contain enough information to judge why this has occurred. Perhaps there are other variables in the same scope which are named the same (minus the p) ☺
+ 1
Thanks. I removed all the Ps in the entire code and it still works.