Why is it recommended to have empty line in the end of a source file?

后端 未结 8 902
独厮守ぢ
独厮守ぢ 2020-12-02 04:44

Some code style tools recommend this and I remember seeing some unix command line tools warning about missing empty line.

What is the reasoning for having an extra e

8条回答
  •  天涯浪人
    2020-12-02 05:27

    Many older tools misbehave if the last line of data in a text file is not terminated with a newline or carriage return / new line combination. They ignore that line as it is terminated with ^Z (eof) instead.

提交回复
热议问题