home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / basic / library / qb_pds / date / datesqz / datsqz.doc next >
Encoding:
Text File  |  1989-08-09  |  3.7 KB  |  77 lines

  1.     ┌───────────────────────────────────────────────────────────────────────┐
  2.     │ Author: Jon R. Meyer           Compiler: QB 4.x and up and            │
  3.     │         484 Neal Ave S.                  Bascom 6                     │
  4.     │         Afton, MN  55001                                              │
  5.     │ Date:   August 8, 1989         Release : 1.0                          │
  6.     │                                                                       │
  7.     │                    Copyright(C) 1989 Jon R. Meyer                     │
  8.     ├───────────────────────────────────────────────────────────────────────┤
  9.     │                                                                       │
  10.     │   Name: DatSqz / DatUnSqz    Type: SUB               Level: BASIC     │
  11.     │                                                                       │
  12.     │   Syntax: CALL DatSqz(Dat$,SqzDat%)  / CALL DatSqz(Dat$,SqzDat%)      │
  13.     └───────────────────────────────────────────────────────────────────────┘
  14.  
  15.      DAtSqz :
  16.  
  17.      Compress an 8 byte string  date (XX/XX/XX) into a 2 byte integer. This
  18.      routine can be used to compress a date to be written to a file to save
  19.      6 bytes per date written.
  20.  
  21.      Example:  
  22.  
  23.        DEFINT A-Z
  24.        Dat$ = "05/29/48"
  25.        call DatSqz(Dat$,Sqzdat%)
  26.  
  27.      DatUnSqz :
  28.  
  29.      Uncompress a 2 byte integer date which has been compressed using
  30.      DatSqz back into an 8 byte string date (XX/XX/XX).
  31.  
  32.      Example:  
  33.  
  34.        DEFINT A-Z
  35.  
  36.        Dat$ = SPACE$(8)
  37.        call DatUnSqz(Dat$, SqzDate%)
  38.        PRINT "The date is " Dat$
  39.  
  40.      Limitations:
  41.  
  42.      These routines will only work over a 100 Year span.  In other words
  43.      "01/01/1901" and "01/01/2001" may conflict.
  44.      Also, it is not possible for you to add or subtract 14 from the SqzDate%
  45.      to get the date 14 days from the date squeezed.
  46.  
  47. ───────────────────────────────────────────────────────────────────────────────
  48.  
  49.      These routines are for whomever wants to use it. I am not charging (at
  50.      this time) anything as long it is used for personal use or freeware
  51.      programs.  If these routines are to be used in any packages that are to be
  52.      sold to the public (either commercially or as registered shareware),
  53.      I feel it is only fair that I be informed of this use. I also feel
  54.      that it would be appropriate in this case to send me a small donation
  55.      (A couple of bucks tops but atleast your name and address and a free
  56.      copy of your program).  I am not in this to make money but if someone
  57.      else is going to make money from my work, I should get at least a
  58.      little something from it.
  59.  
  60.      As you may have noticed, I did not include the source code for these
  61.      routines. The reason for this is to protect these routines and the others
  62.      that I have or may develop from time to time from any changes which may
  63.      cause them to no longer function the way they are documented.  I am
  64.      willing to accept any comments or suggestions for changes but I will
  65.      have the final say (obviously) on what happens. I do not intend to make
  66.      changes which would cause this routine not to function as originally
  67.      documented unless it is felt that the changes will only improve the
  68.      routine. Of course if this happens, I will make note of it so please
  69.      read the documentation.
  70.  
  71.      I do have one thing that I would like to ask of anyone who might decide
  72.      to use these routines, let me know what you think of it.  I like praise
  73.      but I can also take criticism.  You can either send me a note at
  74.      the address above leave a note for me on PC Library BBS in Minneapolis.
  75.      The number is 612-435-8058.
  76.  
  77.