C # Coding specifications summarized by myself-7. Document Download & amp; summary,

Source: Internet
Author: User
Tags coding standards

C # Coding specifications summarized by myself-7. Download and summary of documents,

Today, I finally finished writing this series of coding specifications. This coding specification was counted as reading relevant books. It took a whole month before and after that, and it was my painstaking work.

I didn't plan to write this series so long, but I searched the relevant online materials during the writing process. Later I found that there were very few c # code standards on the Internet, in addition, only a few copies are generic and there is no actual content. So I read the relevant books and wrote this document based on my years of development experience. Hope to help programmers who suffer from no coding standards, and hope that all new programmers will have a good coding habit at the beginning of their career, this will play a vital role in the future growth of individuals.

When writing this specification, I feel that my code capabilities have also improved a lot, especially I Have Some Opinions on naming and commenting.

 

Now, we will share this complete set of normative documents with you. I hope you can give me a thumbs up on the hard work of a month. :-)

C # download the code specification document

I hope that you can correct the content that needs to be added after reading the document. You are also welcome to comment on the discussion in the relevant chapter.

Corresponding chapter

1. Naming rules

1.1 naming conventions

1.2 naming and selection

1.3 Best naming practices in specific scenarios

2. Notes

2.1 Comments and conventions

2.2 unnecessary comments

2.3 required comments

2.4 how to write comments

3. Format

4. Download and summary

 

I feel that blog writing has benefited a lot, and discussions with bloggers can cover problems that I didn't think of before. The truth is that the debate becomes clearer.

We will continue to write blogs in the future. It should all be blogs with new research technical directions.

 


C language knowledge Summary

C language Overview
Chapter 1. Overview
1. Basic knowledge of C Language
1.1 C language execution steps
Edit-enter the program code to generate the source program *. c
Compile-syntax analysis error: translation to generate the Target Program *. obj
(Syntax or logic error, starting from the first change, variable definition, statement format, expression format, etc)
Link-assemble with other target programs or libraries to generate executable programs *. exe
Run
1.2 Basic knowledge of the main Function
Location of the main () function
C Programs are always executed from the main () function.
A c program can contain a main function, that is, the main () function. It can also contain a main () function and several other functions.
1.3. c program structure
Functions and main functions
A program consists of one or more functions.
There must be one and only one main function main ()
Program Execution starts from main and ends in main. Other functions can be executed through nested calls.
Program Statement
A c program consists of statements.
Use ";" as the statement Terminator
Note
//
Or
/**/Is a comment and cannot be nested
No compilation code
1.4 c program writing rules
Used to Use lowercase letters, case sensitive
No row number. No program line concept: A statement usually occupies one row.
Empty rows and spaces can be used.
It is commonly used for the writing format of the tooth form; statements of the same hierarchy are aligned up and down.
Chapter 2 Basic Data Types and operations
2.1. Data Type of c program
Note the differences between types and variables (the types are fixed names and variables are their own names)
Storage space occupied by Variables
Data Type
Basic types: integer, complex, and floating point (single precision and Double Precision)
Construction type: array type and struct type
Pointer type
Null type
Note the initial value Assignment Method for the basic type.
Basic Data Type Representation
Integer Data
Decimal: starts with a non-zero number, for example, 123,-9, 0
Octal; starts with 0, for example, 0123,067
Hexadecimal: starting with 0x, for example, 0x123, 0xff
Real Data
Decimal: it must contain a decimal point, for example, 123.0,-9.0.
Exponential form, for example, 1.23E3, 0.9e-2, 5e2
Balanced data
Common characters: for example, 'A', '2', 'h ','#'
Escape characters: for example, '\ n',' \ 100', '\ xlf ,'\\'
(Realize the alignment of several columns: Specify the width. For example, % 100 \ '\ t)
(String Length. "Abc \ n \ t \" strlen 6; sizeof 7)
Storage length of the basic data type
Integer
Int Byte Count 2-digit 16-32768-32767
Short 2 16-32768-32767
Long 4 32-2147483648-2147483647
Real-type
Float 4 32 3.4e-38---3. 4e38
Double 8 64 1.7e-308---1. 7e308
Character Type
Char 1 8-128----127
2.2 identifier naming rules
C-language flag naming rules
An identifier consists of numbers, letters, and underscores.
The identifier must start with a letter or underline.
The identifier cannot be a reserved word (keyword) in C language)
For example, auto extern sizeof float static case for struct char goto switch continue in typedef const if union default long ...... remaining full text>

Summary of C language courses

At the end of the semester, I had some knowledge of the C language, but I felt that I had not learned very well. Fortunately, I still learned the knowledge:
I learned about C development and basic programming steps, Printf output statements, C language operations, and the types of data, as well as the frequently used if statements, if an eles statement, for loop, while statement, do-while statement, and so on, basically use arrays and pointers, as well as string processing, and the structure that can be learned.
There are still a lot of knowledge points, which are not listed one by one. In short, there are too many things to learn in C language. It is very easy to hear C from the sophomore and junior students, but I don't think it is as simple as people say, C is the most basic. It doesn't mean that the Foundation is simple. It may be because I didn't learn it well.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.