LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 03-12-2002, 04:21 PM   #1
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,378

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
Warning: no newline at end of file


ok, i'm bored with staring at my terminals... one factor involved in the staring prompts me to ask...

Why on earth should I care if my source code file doesn't end in a new line?????
 
Old 03-13-2002, 02:53 AM   #2
Mik
Senior Member
 
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316

Rep: Reputation: 46
Because parsers that aren't written very well always expect a newline at the end of every line. They only check for a eof after they read the complete line including the newline. It's a lot simpler to write a parser that way. But most programs check for either newline or eof.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
warning: deprecated use of label at end of compound statement abk4523 Programming 1 03-06-2005 09:50 AM
[Maybe redundant] main.cpp:1:18: warning: extra tokens at end of #include directive pycoucou Programming 2 10-26-2004 09:57 AM
warning: no final newline at the end of /etc/fstab Jeebizz Slackware 2 10-12-2004 02:19 PM
warning: no newline at end of file huno Programming 1 07-16-2004 09:39 AM
[mntent]:warning: no final newline at the end of /etc/fstab Rodcl Linux - Hardware 4 08-25-2002 02:58 PM


All times are GMT -5. The time now is 07:13 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration