I mean in coding. Notepad apparently displays them as little boxes.
Best use Wordpad.
But how do I type a linebreak?
In Wordpad, you can just use an ordinary carriage return.
What's a carriage return?
its called return - its usually shown on keyboard - either enter or return button makes a icon move to next place
Another explanation: it's an invisible letter that means (forced) end of one line...
Line one,
Line two.
...there's a line break between these two, just behind the comma.
thread split from http://forum.simutrans.com/index.php?topic=3009.0
Maybe this should be de-stickied...?
Ugh...you don't understand! The article on the Simutrans Wiki about making Simutrans goodies said "Please don't use Notepad, it dosen't have linebreaks" and there is a picture of code like this:
cityrules.tab[]#[]#
As you can see, Notepad replaces the linebreaks with little boxes. What are THESE linebreaks meant to be? How do I type them?
If it says "doesn't have" then it's wrongly worded. Notepad has them of course, but only one kind out of three - that is the problem. You are not supposed to see them anyway. That picture just illustrates that notepad doesn't do it properly for these other two cases: Instead of ending the lines, it draws some weird boxes and goes on with the line.
But this discussion is moot. That requirement for dat files is obsolete. Newer makeobj versions handle line breaks just fine natively, so use notepad and everything will work. The only problems might be when you open older files.
If you want to be 100% on the safe side, use notepad++ or pspad or or or... there are lots of good text editors that understand line breaks of all 3 kinds. The two I named are just the most popular on Windows these days.
For a starter on this topic, reddog, the important thing to remember is that computers don't really know what letters are, all they know is binary. Different computer systems have different ways of encoding text into binary. Almost all use variants of the "ASCII" code nowadays. This standardized the encoding of the 10 Arabic numerals, the 26 Latin alphabet characters (uppercase and lowercase), "space", and some punctuation. Unfortunately it didn't standardize everything: there are two different common ways of encoding a "line break", as well as two uncommon ways.
The difference between the different encodings can be seen most clearly if you open up a text file with a hex editor.
Simutrans doesn't care what encoding you use for linebreaks any more.
Many programming tools can handle both, but notice that they're different, which is why I'm having problems with "spurious differences" -- they notice that the linebreaks are encoded differently and decide that OMG EVERY LINE IN THE FILE HAS CHANGED! The version control systems (subversion, git) have tools for automatically ironing out the differences by making sure the linebreaks are all standardized automatically when they're checked in -- but the tools have to be *turned on*, which so far they haven't been.... but that's another topic, literally....
Errmm... So, where the weird boxes are, what do I type? A space? A new line?
The "weird boxes" are how old versions of Notepad interpret hexadecimal 0A by itself. Most programs interpret hexadecimal 0A as "line break". If you are seeing weird boxes, *use a different text editor*. If you aren't seeing weird boxes on your machine, don't worry about it.
If you replace each "weird box" with a line break in Notepad, you'll create a file with lots of hexadecimal "0D 0A" sequences in it, because that's what Notepad writes when you put in a line break.
Simutrans can handle either "0D 0A" or "0A" by itself and knows that either means "line break".
Historically, UNIX used 0A (ASCII line feed) as end-of-line; CP/M, its clone MS-DOS, and then Windows use 0D 0A (carriage return, line feed) as end-of-line; and old MacOS used just 0D as carriage return alone. Let's hear it for standards!
Reddog - just write :)
edit: removed previous text after ~2 min.
And certain mainframes, along with most actual teletype machines, used 0A 0D (notice the different order). :)