Raised This Month: $7 Target: $400
 1% 

[TUT] Code Styling & Good Programming Habits


Post New Thread Reply   
 
Thread Tools Display Modes
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 02-09-2009 , 12:01   Re: [TUT] Code Styling
Reply With Quote #21

Quote:
Originally Posted by Exolent[jNr] View Post
Don't put 2 statements on one line.
It was an example to show how semicolons can be used. He gave another example right after that where they were on two different lines.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-09-2009 , 12:11   Re: [TUT] Code Styling
Reply With Quote #22

I know, but some beginners won't know it was wrong if it wasn't stated.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
SchlumPF*
Veteran Member
Join Date: Mar 2007
Old 02-11-2009 , 15:34   Re: [TUT] Code Styling
Reply With Quote #23

nice thread hawk + i agree cuz its very similar to my style
good codes are one thing, finding solutions for huge problems is another thing BUT having a readable code has a very high priority as soon as you are planning to release a plugin or share the source in any way. just look at numbs plugins, then you know what i mean (at least most of his plugins show how a code shouldnt... ).
numb <3
__________________
SchlumPF* is offline
Send a message via ICQ to SchlumPF*
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 02-22-2009 , 11:13   Re: [TUT] Code Styling
Reply With Quote #24

hey Hawk, nice tut but I allways use in my plugins semicolons at the end of line.....
My question is, i must put this #pragma semicolon 1 in every plugin?
__________________
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 02-22-2009 , 11:37   Re: [TUT] Code Styling
Reply With Quote #25

No.
__________________
hleV is offline
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 02-22-2009 , 11:45   Re: [TUT] Code Styling
Reply With Quote #26

ok thank you
__________________
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 02-22-2009 , 12:29   Re: [TUT] Code Styling
Reply With Quote #27

you can put it to be sure what you placed ; at end of all lines :]
__________________
xPaw is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 02-22-2009 , 15:20   Re: [TUT] Code Styling
Reply With Quote #28

IMO it's useless because there's nothing bad if you forgot to put ; somewhere.
__________________
hleV is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-22-2009 , 16:08   Re: [TUT] Code Styling
Reply With Quote #29

It's a nice habit to use ; so that you won't need to have to remember to use it in one language and not another.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 02-23-2009 , 01:27   Re: [TUT] Code Styling
Reply With Quote #30

Quote:
Originally Posted by Exolent[jNr] View Post
It's a nice habit to use ; so that you won't need to have to remember to use it in one language and not another.
I program in C++ at work and I have no problem switching between the two at any time.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Reply


Thread Tools
Display Modes

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 03:44.


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