Your way to write simple comments -


how guys write comments on simple code use yourself?

i write javascript , php code, , can't feel found nice way write comments.

if have short line of code, this:

x = dothis(getsomevaluefromsomewhere());  // short line of code 

which seems nice think, doesnt works when line gets little longer or on multiple lines,

 // dont since it's not clear if describes line 1, or lines.  alongervariablename = (getsomevaluefromsomewhere() == "this want") ? "true value" : "false value";  x = dothis(alongervariablename);  

so, how do it?

(*  * blocks of comments serve important documentation  * e.g descriptions of functions.  *) 

maybe reformatted as

 (* blocks of comments thet serve important documentation   * e.g descriptions of functions. *) 

and // short inline comments do. don't forget ctrl-/ friend ;-)


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -