home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 31 / CDASC_31_1996_juillet_aout.iso / vrac / file2inc.zip / FILE2INC.DOC < prev    next >
Text File  |  1996-06-13  |  3KB  |  73 lines

  1. ___________________________________________________________________________
  2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3. Documentation for FILE2INC.EXE:
  4.  
  5. Files included in archive:
  6. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  7. FILE2INC.EXE -- Executable
  8. EXAMPLE.PAS -- Turbo Pascal program that demonstrates FILE2INC
  9. EXAMPLE.INC -- INC file created by FILE2INC
  10. FILE_ID.DIZ -- A descriptor
  11. FILE2INC.DOC -- What you're reading now
  12.  
  13.  
  14. What is it?
  15. ~~~~~~~~~~~
  16.  FILE2INC converts any ordinary binary file into a text file which can
  17. be included in any ordinary Turbo Pascal program. A variable can then be
  18. used to access the constant it creates, reading it just like an ordinary
  19. file. In this way, a GIF, ANSI, etc, can be included with a program
  20. without having to access the file when the program is run. This is 
  21. impractical, however, with very large files.
  22.  
  23.  
  24. Using FILE2INC:
  25. ~~~~~~~~~~~~~~~
  26.  Simple:
  27.  
  28.  FILE2INC <inputfile> <outputfile>
  29.  
  30.  All extensions should be written down. Example:
  31.  
  32.  FILE2INC test.gif test.inc
  33.  
  34.  Will create the CONST array "test" in the "TEST.INC" file. Another
  35.  CONST will be created -- "testsize" which will tell the size of the
  36.  array. (The size of the array will be from 0 to the size of the input
  37.  file minus one.)
  38.  
  39.  Array must be put into the Turbo Pascal program with the {$I filename} 
  40.  compiler directive (see EXAMPLE.PAS for usage).
  41.  
  42.  Note: Maximum size of the data segment of a program is 65,520 bytes.
  43.  The array, and hence the input file, can not exceed this size. If
  44.  the array is too large, Turbo Pascal will give either error #49
  45.  "Data segment too large" or error #22 "Structure too large."
  46.  
  47.  
  48. Examples:
  49. ~~~~~~~~~
  50.  Included in the archive are two example files -- EXAMPLE.PAS & EXAMPLE.INC.
  51. When EXAMPLE.PAS is compiled, EXAMPLE.INC will be compiled into it. Keep
  52. in mind that this is a very simple example using only a text file, and
  53. that more complex files, such as GIFs, can be compiled into EXE files
  54. and used in a similar way.
  55.  
  56.  
  57. Disclaimer, etc.
  58. ~~~~~~~~~~~~~~~~
  59.  FILE2INC has lots of error checking built in, but you use this program
  60. at your own risk.
  61.  
  62.  This program was written by Fire Frog in May, 1996. I can be reached
  63. on Internet or at the wonderful BBS listed below. This program is also
  64. freeware, but if you like it or would like to see any changes, write
  65. me at my Internet address or the BBS.
  66.  
  67.  E-Mail address: frog@star2.opsys.com
  68.  
  69.  Or send e-mail to "Fire Frog" on the MANx BBS based in the Miami, Florida
  70.  area: 305-245-0113.
  71. ___________________________________________________________________________
  72. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  73.