Difference between revisions of "AMOS:Reading textfiles"
Spellcoder (talk | contribs) (some info on which end-of-line characters are used on which OS + how to read textfiles with those eol codes in AMOS) |
(No difference)
|
Latest revision as of 15:25, 31 December 2008
AMOS on default uses two characters to tell where a line end, while Amiga texteditors usually use only one character (line feed). So to read a textfile which was created on an Amiga use:
Set Input 10,-1
Common used newline codes
Operating systems differ in which characters they use to tell where a line ends.
In this table you see a list of the most common combinations and what arguments to use for Set Input to be able to read those textfiles:
Operating system | AMOS | character names |
---|---|---|
Amiga/Linux/MAC OS X | Set Input 10,-1 | (LF) |
Atari/MSDOS/Windows | Set Input 13,10 | (CR+LF) (AMOS default) |
C64 | Set Input 13,-1 | (CR) |