Code::Blocks Forums
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
As usual while waiting for the next release - don't forget to check the
nightly builds
in the forum.
Home
Help
Search
Login
Register
Code::Blocks Forums
»
User forums
»
Help
»
new line at the end of line
« previous
next »
Send this topic
Print
Pages: [
1
]
Go Down
Author
Topic: new line at the end of line (Read 7611 times)
jokerar
Guest
new line at the end of line
«
on:
August 11, 2005, 04:28:43 am »
the compiler said that i must put a newline character(return) at the end of
every line of my code.
the Q is:
is this a programming requirement or is it compiler specified requirement?
thank
Logged
Ceniza
Developer
Lives here!
Posts: 1441
Re: new line at the end of line
«
Reply #1 on:
August 11, 2005, 05:58:37 am »
It's more like a compiler specific "requirement" (it's just a warning). I would really like to know why it likes it that way
Logged
rickg22
Lives here!
Posts: 2283
Re: new line at the end of line
«
Reply #2 on:
August 11, 2005, 06:18:28 am »
That's why I added the feature in CVS
Logged
takeshimiya
Guest
Re: new line at the end of line
«
Reply #3 on:
August 11, 2005, 06:25:00 am »
It's not only a compiler specific "requeriment", it's the way ALMOST ALL Linux/Unix utilities expect a text file.
So as a general rule you must always put a newline character when editing any text file (not only .cpp)
Logged
thomas
Administrator
Lives here!
Posts: 3979
Re: new line at the end of line
«
Reply #4 on:
August 11, 2005, 08:57:57 am »
And it is part of the ISO standard for C and C++.
Although gcc has no problems with it, some old preprocessors would mess up under certain circumstances (#include following a file that has no line end).
Logged
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."
mandrav
Project Leader
Administrator
Lives here!
Posts: 4315
Re: new line at the end of line
«
Reply #5 on:
August 18, 2005, 08:57:11 pm »
And it is a warning because, under certain circumstances, it could lead to a compiler error.
Yiannis.
Logged
Be patient!
This bug will be fixed soon...
Send this topic
Print
Pages: [
1
]
Go Up
« previous
next »
Code::Blocks Forums
»
User forums
»
Help
»
new line at the end of line