home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / clarion / tools / cripple / govern.doc
Text File  |  1991-11-30  |  2KB  |  57 lines

  1. ------------------------------------------------------------
  2. CREATING A FULLY FUNCTIONAL "CRIPPLED" DEMO OF YOUR PROGRAM
  3. ------------------------------------------------------------
  4.  
  5. If you use the "GOVERN" procedure below as the SETUP and/or SHUTDOWN()
  6. procedure in your program, substituting your own file label(s) for
  7. 'DataFil1' and 'Datafil2', and specifying your own record quantity
  8. limit as the parameter of the local variable 'ibLimit', you can can
  9. create a fully functional "demo" copy of your working application. 
  10. Place a message something like "Demo Copy - Limited to 5 records
  11. per file" and your Company name and phone number conspicuously on
  12. the main menu screen of your program.  Each time the user starts
  13. and/or exits the program, all records created above the specified limit
  14. will be automatically deleted.  If you wish to distribute "Trial"
  15. copies of your software, you may do so using this method, and then
  16. simply send a patch disk (patch utilites supported by Clarion are
  17. available commercially) specific to that particular copy (via an 
  18. embedded serial number, etc.) which removes the "GOVERN" procedure, to
  19. update your EXE file when/if the user remits full payment.  
  20.  
  21.              MEMBER()
  22. GOVERN       PROCEDURE
  23.  
  24. ibLimit         Byte(5)
  25.  
  26.   CODE
  27.   IF RECORDS(DataFil1) > ibLimit
  28.      SET(DataFil1)
  29.      SKIP(DataFil1,ibLimit)
  30.      LOOP WHILE NOT EOF(DataFil1)
  31.        NEXT(DataFil1)
  32.        IF NOT ERRORCODE()
  33.          DELETE(DataFil1)
  34.      END
  35.   END
  36.  
  37.   IF RECORDS(DataFil2) > ibLimit
  38.      SET(DataFil2)
  39.      SKIP(DataFil2,ibLimit)
  40.      LOOP WHILE NOT EOF(DataFil2)
  41.        NEXT(DataFil2)
  42.        IF NOT ERRORCODE()
  43.          DELETE(DataFil2)
  44.      END
  45.   END
  46.   RETURN
  47.  
  48. **************************************
  49. Submitted by:
  50.  
  51. JAMES PORTANOVA
  52. HOT PROPERTIES SOFTWARE
  53. Post Office Box 437
  54. Fresh Meadows, New York 11365-0437
  55. 10/14/91
  56.  
  57.