AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Code Snippets/Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=83)
-   -   [TUT] Code Styling & Good Programming Habits (https://forums.alliedmods.net/showthread.php?t=85274)

Hawk552 02-09-2009 12:01

Re: [TUT] Code Styling
 
Quote:

Originally Posted by Exolent[jNr] (Post 758820)
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.

Exolent[jNr] 02-09-2009 12:11

Re: [TUT] Code Styling
 
I know, but some beginners won't know it was wrong if it wasn't stated.

SchlumPF* 02-11-2009 15:34

Re: [TUT] Code Styling
 
nice thread hawk + i agree cuz its very similar to my style :D
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... :P).
numb <3

tuty 02-22-2009 11:13

Re: [TUT] Code Styling
 
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?

hleV 02-22-2009 11:37

Re: [TUT] Code Styling
 
No.

tuty 02-22-2009 11:45

Re: [TUT] Code Styling
 
ok thank you :mrgreen:

xPaw 02-22-2009 12:29

Re: [TUT] Code Styling
 
you can put it to be sure what you placed ; at end of all lines :]

hleV 02-22-2009 15:20

Re: [TUT] Code Styling
 
IMO it's useless because there's nothing bad if you forgot to put ; somewhere.

Exolent[jNr] 02-22-2009 16:08

Re: [TUT] Code Styling
 
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.

Hawk552 02-23-2009 01:27

Re: [TUT] Code Styling
 
Quote:

Originally Posted by Exolent[jNr] (Post 766858)
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.


All times are GMT -4. The time now is 08:38.

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