Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Peter Norton Programmer's Guide - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

  Ordinary text files are made up of only the standard ASCII characters and
  do not use the extended ASCII characters. In the ASCII coding scheme, the
  first 32 characters, ASCII 00H through 1FH (decimal 0 through 31), have
  special meanings: Some are used for formatting text and others are
  generally used for communications control. These control characters are
  rarely displayed or printed.

  Only a handful of formatting characters are widely used in ordinary text
  files. They were originally developed as commands to tell a printer how to
  format a printed page and how to recognize the end of a file. Now their
  use extends to all output devices. We'll discuss each of the main
  formatting characters in turn.

  ASCII 1AH (decimal 26) marks the true end of a text file. This character
  may come before the end of the file indicated by the file size in the
  directory entry. This is because some text-processing programs read and
  write files, not byte by byte, but in larger chunks--128 bytes at a time.
  When they transfer data in this way, DOS sees only the end of the 128-byte
  block and does not recognize the actual end of the file delimited by the
  end-of-file character.

  ASCII 0DH (decimal 13) and ASCII 0AH (decimal 10) normally divide a text
  file into lines by marking the end of each line with a carriage return
  (ASCII 0DH) and a linefeed (ASCII 0AH), usually in that order. Many
  text-processing programs have difficulty with lines of more than 255
  characters, and some are limited to 80 character lines.

  A carriage return can be used by itself. Unfortunately, such usage can be
  interpreted as either of two things: the end of a line with a linefeed
  that is implied and automatically provided by some printers; or a return
  to the beginning of the current print line, which causes the entire line
  to be overprinted. (The backspace character, ASCII 08H, is also sometimes
  used to make a printer overstrike a character.)

  ASCII 09H, the tab character, is sometimes used to represent one or more
  spaces, up to the tab location. Unfortunately, as yet, there is no
  universal convention on tab settings, which makes the use of the tab
  character uncertain. However, one of the most common tab settings is every
  eight spaces.

  ASCII 0CH (decimal 12), the formfeed or page eject, is another format
  character. This character tells a printer to skip to the top of the next
  page.

  Other formatting characters, such as the vertical tab (ASCII 0BH, decimal
  11), are available but are not widely used with personal computers.

  You can avoid many difficulties by having programs create text files with
  simple formats. The simplest formats allow lines no longer than 255
  characters and use only the carriage-return (ASCII 0DH), linefeed (ASCII
  0AH), and end-of-file (ASCII 1AH, decimal 26) formatting characters. Many
  programming languages, including BASIC and Pascal, can automatically
  generate these formatting characters when creating text output.

  Most compilers and assemblers expect to read source code in this ordinary,
  plain format. Rarely can a language translator work with the more complex
  formats created by some word processors.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson