This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Standardization, issue


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NullWarez
Member
Join Date: Aug 2010
Location: Internet
Old 03-05-2011 , 06:08   Standardization, issue
Reply With Quote #1

Why do so many people give a variable name like g_iPlayers, g _iNum ??

Because of this bullshit is not understood, that in variable.

And why prefix g_??

Why for example, for variables not var_?
For the constants const_

And the friendly name like:

new var_players_count, var_players_id
new const_MAX_PLAYERS = 33

As all the same to write?

And why not punishable comments on non-English languages? (The code)

This crap, read the code comments in other languages. And when people give the names of functions such as: gutten_morgen_shlozenburgen (Draytung, shlozeen [], nicht) In general i can not understand
__________________
Develop ZP 4.3 Tear Devil
NullWarez is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-05-2011 , 06:32   Re: Standardization, issue
Reply With Quote #2

g_ for global. Such notation is called hungarian notation. Though I personally hate that and it doesn't really make sense in Pawn. If the var is well-named, you don't need to use such notation.

Hawk552 has done a tuto about code styling : http://forums.alliedmods.net/showthread.php?t=85274, it may interest you.
__________________
Arkshine is offline
NullWarez
Member
Join Date: Aug 2010
Location: Internet
Old 03-05-2011 , 07:34   Re: Standardization, issue
Reply With Quote #3

Thank you! This is what I was looking for!
__________________
Develop ZP 4.3 Tear Devil
NullWarez is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:07.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode