home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / DECODEBA.ZIP / DECODE.TXT < prev    next >
Encoding:
Text File  |  1980-01-01  |  1.6 KB  |  41 lines

  1. --------------------------------------------------------------------------
  2.                        F i l e    I n f o r m a t i o n
  3.  
  4. * DESCRIPTION
  5. Letter explaining DECODE.PAS.
  6. Requires: Turbo Pascal 2.0, 3.0. Author: Rick Solomon. Version T1.0
  7.  
  8. * ASSOCIATED FILES
  9. DECODE.PAS
  10. DECODE88.PAS
  11. DECODE.TXT
  12.  
  13. ==========================================================================
  14. }
  15.  
  16.             Rick Solomon SOLORCAM6K/I000547
  17.             Exhibition Place
  18.             Toronto, Ontario
  19.             Canada M6K 3C3
  20.             416-593-7551
  21.  
  22. I know that the rules state that entries must be complete programs,
  23. but a complete program can't be written to use the two versions of
  24. the function I've written until some very specific information about
  25. the application in which one of them is to be used is established.
  26.  
  27. FUNCTION DECODE is used in Turbo programs which read files created
  28. by BASIC programs and rewrite them in TurboPascal format. Integers
  29. can be read as is, and strings can be read easily, provided we re-
  30. member to read the BASIC string as an ARRAY [1..N] OF CHAR before
  31. converting it to STRING [N]. Real numbers are a problem, however.
  32. As explained in the source code, they have to be read as an
  33. ARRAY [1..4] OF BYTE and converted to REAL by using DECODE. The
  34. routines themselves are quite simple, but it took me a long time to
  35. figure them out. You wouldn't believe the number of 'experts' around
  36. Toronto who didn't have any idea on how to do this task.
  37.  
  38. Listing DECODE.PAS is the general form of the function and will work
  39. with any version of TurboPascal; DECODE88.PAS will not work with
  40. TURBO-87 or TURBOBCD.
  41.