Sunday, March 4, 2018

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



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 empty line?


Answer



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.


No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...