|
|
#1 |
|
\m/
(Forum King) |
Why is it that gcc give a warning?
Why is it that gcc (and perhaps other compilers) give you a warning if you don't have a blank line at the end of a source file?
Never underestimate the bandwidth of a station wagon full of tapes hurtling down the highway. |
|
|
|
|
|
#2 |
|
Forum King
Join Date: Jul 2002
Location: Norn Ir'nd, leek...
Posts: 6,287
|
because the blank line makes it all work.
|
|
|
|
|
|
#3 |
|
w3 addict
(Major Dude) Join Date: May 2004
Location: Norway
Posts: 1,806
|
The reason is that you don't have the right linebreak... some windows programs makes the wrong linebreak charcode.. if you have ever opened a document in Notepad or similar and everything in the document is on a single line with black boxes in between the words, that's the correct type of linebreak that shuts up gcc.exe
09 F9 11 01 9D 74 E8 5B D8 41 56 C3 63 56 81 C0 |
|
|
|
|
|
#4 |
|
\m/
(Forum King) |
thank you, pulse. no .exe here
Never underestimate the bandwidth of a station wagon full of tapes hurtling down the highway. |
|
|
|
|
|
#5 |
|
w3 addict
(Major Dude) Join Date: May 2004
Location: Norway
Posts: 1,806
|
Or gcc for other platforms
09 F9 11 01 9D 74 E8 5B D8 41 56 C3 63 56 81 C0 |
|
|
|
|
|
#6 | |
|
Court Jester
(Forum King) |
Quote:
The real reason is that it's conventional to have a blank line at the end of a program source. When most programmers do it and you have a file without the blank line, it's probable that the file was not downloaded completely, or truncated at the wrong position, etc.. gcc is just being nice by reminding you to double-check the file for completeness. |
|
|
|
|
|
|
#7 |
|
w3 addict
(Major Dude) Join Date: May 2004
Location: Norway
Posts: 1,806
|
I've tried it, I used notepad for coding.. whining, and I put a "black box" from another document in at the end of the line.. (I did have a line at the end before too), and voilà, no whine.
There are different linebreaks, wordpad converts the ones that notepad don't but I think wordpad makes the same linebreaks as notepad if you press enter... meaning, you get the same whine using wordpad as notepad. 09 F9 11 01 9D 74 E8 5B D8 41 56 C3 63 56 81 C0 |
|
|
|
|
|
#8 |
|
\m/
(Forum King) |
kate or kwrite for me. I especially like kwrite because sometimes kate seems to use a lot of resources for a text editor.
Never underestimate the bandwidth of a station wagon full of tapes hurtling down the highway. |
|
|
|
|
|
#9 |
|
Forum King
Join Date: Jul 2002
Location: Norn Ir'nd, leek...
Posts: 6,287
|
My mum is not a text editor!
|
|
|
|
|
|
#10 |
|
w3 addict
(Major Dude) Join Date: May 2004
Location: Norway
Posts: 1,806
|
Now I use Blodshed Dev-C++ but early stages of regular ANSI C I used notepad...
09 F9 11 01 9D 74 E8 5B D8 41 56 C3 63 56 81 C0 |
|
|
|
|
|
#11 |
|
Forum King
Join Date: Jan 2002
Location: the nether reaches of bonnie scotland
Posts: 13,375
|
I use jEdit, since I write many different languages (Java, Javascript, XUL, XBL, generic XML, Java, C, OCaml, Python and a couple of others) for various reasons, and screw getting a seperate IDE for each one. Also, jEdit is cross-platform, meaning I can use the same one on both Windows and Linux. Which is especially handy since I don't really like EMacs, and can't stand using Vim.
|
|
|
|
|
|
#12 |
|
Sawg 2.0
Major Dude Join Date: Mar 2004
Posts: 5,916
|
Pretty much every text editor in the world EXCEPT Notepad supports Unix text files.
|
|
|
|
|
|
#13 |
|
Forum King
Join Date: Jan 2002
Location: the nether reaches of bonnie scotland
Posts: 13,375
|
Do Macs use UNIX text files in OS X? They used to use some other linebreak format...
|
|
|
|
|
|
#14 |
|
w3 addict
(Major Dude) Join Date: May 2004
Location: Norway
Posts: 1,806
|
I belive it's UNIX linebreaks that notepad don't understand. We're talking about win98 notepad here, not the one with XP cause that one is greately improved since win98.
09 F9 11 01 9D 74 E8 5B D8 41 56 C3 63 56 81 C0 |
|
|
|
|
|
#15 |
|
\m/
(Forum King) |
It can get very confusing i think when you work on a file in something like kate and you get some lines that are particularly long. Then you open them in gedit or something similar and all of a sudden, word wrap is on!!! wtf?
Never underestimate the bandwidth of a station wagon full of tapes hurtling down the highway. |
|
|
|
|
|
#16 | |
|
Court Jester
(Forum King) |
Quote:
|
|
|
|
|
|
|
#17 |
|
Forum King
Join Date: Jul 2002
Location: Norn Ir'nd, leek...
Posts: 6,287
|
XP notepad also hates UNIX linebreaks.
|
|
|
|
|
|
#18 |
|
Forum King
Join Date: Jan 2002
Location: the nether reaches of bonnie scotland
Posts: 13,375
|
It's an extremely basic text editor for Windows, it wows me that people think it's gonna deal with UNIX linebreaks...
|
|
|
|
|
|
#19 |
|
Forum King
Join Date: Jul 2002
Location: Norn Ir'nd, leek...
Posts: 6,287
|
name another text editor that doesnt then.
|
|
|
|
|
|
#20 |
|
w3 addict
(Major Dude) Join Date: May 2004
Location: Norway
Posts: 1,806
|
To convert a charcode isn't much hard work when it's ASCII... even I could make a code for that :P
When it's reading the datastream, everytime it stumbles across a UNIX linebreak, change the charcode to the appropriate one.. OR it could just read both as linebreaks... even saving the old ones as the old charcode..which would make a mess on another text editor that can't read both types... so there are some places where the line breaks and some places it fails.. maybe to much of a mezz when I think of it. 09 F9 11 01 9D 74 E8 5B D8 41 56 C3 63 56 81 C0 |
|
|
|
|
|
#21 | |
|
Forum King
Join Date: Jan 2002
Location: the nether reaches of bonnie scotland
Posts: 13,375
|
Quote:
|
|
|
|
|
|
|
#22 |
|
w3 addict
(Major Dude) Join Date: May 2004
Location: Norway
Posts: 1,806
|
Well, since notepad have excisted since the dawn of windows... thinking of edit.com as it's ancestor, there would be a whole lot of wasted time to make such a program wouldn't it? The XP version can at least replace text, it alos have feedback on what line/char the marker is, and it can also save by <ctrl> + <s>
All these features didn't excist in the win3.1/95/98 version of notepad. Looking away from the fact that it can't convert/create UNIX linebreaks, Notepad clearly is the ASCII editor for the simple minded. Many ppl like it that way, and I can actually say I have used it for a lot of HTML and C. For C/C++ nowadays I use Dev-C++ and for everything else (like MAKI), I use Textpad 4 Evaluation which I got on a CD with one of my Java books. I like it very much, and the only thing I don't like it for, is the lack of coloring certain types of documents, like XML which I automatically set to HTML so I at least get attribute comments and < > filtered with colors. 09 F9 11 01 9D 74 E8 5B D8 41 56 C3 63 56 81 C0 |
|
|
|
|
|
#23 |
|
Sawg 2.0
Major Dude Join Date: Mar 2004
Posts: 5,916
|
I know it's notepad, and susposed to be dead simple and not on top of Mircosoft's development list. But really, how hard would it be to add Unix file support.
|
|
|
|
|
|
#24 |
|
Forum King
Join Date: Jan 2002
Location: the nether reaches of bonnie scotland
Posts: 13,375
|
How useful would it be? It's designed for taking notes. It would be trivial to add it, but it's support for the format of another OS -- why add it?
A thought though -- maybe services for UNIX adds support? |
|
|
|
|
|
#25 |
|
Sawg 2.0
Major Dude Join Date: Mar 2004
Posts: 5,916
|
Yeah, but it is also the default application for .TXT files. If you want to be the defualt for them you should support all of them.
|
|
|
|
|
|
#26 |
|
w3 addict
(Major Dude) Join Date: May 2004
Location: Norway
Posts: 1,806
|
And if you MUST convert the linebreaks, you can also use the wordpad.. which always have been able to convert linebreaks properly.. or write as it was named under win3x
09 F9 11 01 9D 74 E8 5B D8 41 56 C3 63 56 81 C0 |
|
|
|
|
|
#27 |
|
Forum King
Join Date: Jul 2002
Location: Norn Ir'nd, leek...
Posts: 6,287
|
i used to do essays for school in write!
|
|
|
|
|
|
#28 |
|
\m/
(Forum King) |
<3 edit.com
Never underestimate the bandwidth of a station wagon full of tapes hurtling down the highway. |
|
|
|
|
|
#29 | |
|
Court Jester
(Forum King) |
Quote:
edlin.com anyone? |
|
|
|
|
|
|
#30 |
|
\m/
(Forum King) |
Wow. I never even noticed that. I think I'm going to write my term paper in edit.com
On a side not. . . http://www.command.com Never underestimate the bandwidth of a station wagon full of tapes hurtling down the highway. |
|
|
|
|
|
#31 |
|
w3 addict
(Major Dude) Join Date: May 2004
Location: Norway
Posts: 1,806
|
No, Notepad doesn't decend from edit.com, but it's what microsoft replaced edit.com with for windows. I belive windows 1.0 still used Edit, but 3.1 you had both.
09 F9 11 01 9D 74 E8 5B D8 41 56 C3 63 56 81 C0 |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|