Chasm
Would you like to react to this message? Create an account in a few clicks or log in to continue.



 
HomePortalLatest imagesSearchRegisterLog in
These forums are no longer in use. If you want to post, please go to the new forums at http://chasm.hostei.com/forum
Log in
Username:
Password:
Log in automatically: 
:: I forgot my password
Latest topics
» Tribe-based spells
Rigorous coding syntax Emptyby enigma Wed Jul 08, 2009 7:20 pm

» Basic formula for attack damage
Rigorous coding syntax Emptyby enigma Mon Jul 06, 2009 3:58 pm

» Idea for the game
Rigorous coding syntax Emptyby AMV_Ph34r Sat Jul 04, 2009 11:36 pm

» Ogre Engine
Rigorous coding syntax Emptyby AMV_Ph34r Wed Jun 24, 2009 9:08 am

» New coding engine
Rigorous coding syntax Emptyby AMV_Ph34r Tue Jun 23, 2009 4:13 pm

» New Website
Rigorous coding syntax Emptyby AMV_Ph34r Mon Jun 22, 2009 3:55 pm

» Some Thoughts
Rigorous coding syntax Emptyby AMV_Ph34r Sat Jun 20, 2009 1:05 pm

» Beginning coding!!
Rigorous coding syntax Emptyby AMV_Ph34r Mon Jun 15, 2009 12:19 pm

» Rigorous coding syntax
Rigorous coding syntax Emptyby AMV_Ph34r Sun Jun 14, 2009 8:00 pm

Statistics
We have 3 registered users
The newest registered user is enigma

Our users have posted a total of 105 messages in 21 subjects
Who is online?
In total there are 3 users online :: 0 Registered, 0 Hidden and 3 Guests

None

Most users ever online was 10 on Tue Feb 13, 2018 9:34 pm

 

 Rigorous coding syntax

Go down 
2 posters
AuthorMessage
enigma
Administrator
Administrator
enigma


Posts : 41
Join date : 2009-06-12
Age : 30

Rigorous coding syntax Empty
PostSubject: Rigorous coding syntax   Rigorous coding syntax EmptySun Jun 14, 2009 11:28 am

I really want to make this as professional as possible, and both my parents are professional computer programmers, so they are helping me (and you in turn) to make this as much like the work of a professional as theirs (hopefully).

I know you guys don't take commenting very seriously, but you HAVE TO if you want to go anywhere in this field. Function headers are very, Very, VERY important. The header can be longer than or nearly as long as the function! Here is an example from being.cpp

/*****************************************************************
/ NAME: checkDeath
/ CLASS: being
/ AUTHOR: Brien Croft
/ DATE: 6/14/09
/ FUNCTION: Checks to see if the being is dead (their hp is less or equal to 0), and if so, calls the destructor
/ RETURNS: Boolean confirming or denying the being's death
/
/******************************************************************/

being::checkDeath()
{
if(currhp < 0)
{
~being;
return true;
}
else
{
return false;
}
}
//This code is indented correctly, but it might not display that way.


This has to be done for EVERY function. It's tedious, but it works, and it's professional. Please do this for every function you make. It might seem stupid and boring, but it will pay off in the long run. It makes compatibility so much easier!! Thanks!! You guys rock!!
Back to top Go down
AMV_Ph34r
Administrator
Administrator
AMV_Ph34r


Posts : 50
Join date : 2009-06-11
Age : 31

Rigorous coding syntax Empty
PostSubject: Re: Rigorous coding syntax   Rigorous coding syntax EmptySun Jun 14, 2009 8:00 pm

Alright. I'm still not completely sure exactly what the stuff in the header file does, but I'll be sure to use it.
Back to top Go down
https://chasm.darkbb.com
 
Rigorous coding syntax
Back to top 
Page 1 of 1
 Similar topics
-
» New coding engine
» Beginning coding!!
» Confusing Coding Topics

Permissions in this forum:You cannot reply to topics in this forum
Chasm :: Project Discussion :: Coding-
Jump to: