Sunday, 4 March 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

casting - Why wasn't Tobey Maguire in The Amazing Spider-Man? - Movies & TV

In the Spider-Man franchise, Tobey Maguire is an outstanding performer as a Spider-Man and also reprised his role in the sequels Spider-Man...