![]() ![]() I like to see my curls line up and encapsulate the control code. I prefer what wikipedia calls "Allman style" When you work for a company they might have a mandatory writing style, to prevent an accumulation of mish-mash code. Information is nested and separated in a logical way so it is easy to read and understand. ![]() The compiler doesn't care about any of that, it just reads in the code and removes all your indentation and line breaks anyway, but all the formating is for making it human readable. Indentation and spacing in a program is a lot like writing a book, there are sentence structures delineated by punctuation, paragraphs delineated by line spaces, and chapters delineated by page breaks. If you have a long program that is really mangled, there are code beautifiers programs, but for now just learn to do it yourself. There are many styles in use.Ī problem crops up when you move from editor to editor, because each one will interpret a tab character as a different number of spaces, and some of the lines may not have tabs at all and the person used spaces, so the formating gets messed up. It's best not to rely on features to indent your code. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |