#White space convention for C

17 messages · Page 1 of 1 (latest)

sharp elm
#

Should I do c=0 or c = 0? I think i've seen the former more.

indigo cryptBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.

shy yarrow
#

do whatever you want

sharp elm
#

or is there any other standard (like google) that I can refer to

#

just want to stick to convention

twin plover
#

these are stylistic choices, afaik no comments are made in the standard

#

use a style you like, if you're working on another codebase then use thei rstyle

#

to make life easier, use a formatter like clang-format

timid mason
#

i wouldn't do c=0 for variables with a name longer than 1 letter

eternal pewter
#

Use spacing to improve the readability of the code. For simple initialization, it doesn't matter. You can prefer anything.

topaz surge
#

c = 0; better readability of symbols. don't be shy about using lots of whitespace... use as much as you want.

sharp elm
#

thanks guys

#

.close

#

!solved

sharp elm
#

!solved