home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a012 / 1.ddi / CHAP23.EXE / CHP2308.PRG < prev    next >
Encoding:
Text File  |  1991-04-30  |  742 b   |  34 lines

  1. /*
  2.    Listing 23.8  Form letter sample
  3.    Author: Joe Booth
  4.    Excerpted from "Clipper 5: A Developer's Guide"
  5.    Copyright (c) 1991 M&T Books
  6.                       501 Galveston Drive
  7.                       Redwood City, CA 94063-4728
  8.                       (415) 366-3600
  9. */
  10.  
  11. //───── NOTE: must compile with the /N option!
  12.  
  13. STATIC nWide := 60
  14.  
  15. function form_lett( mText )
  16. LOCAL num_lines := mlcount(mText, nWide), jj
  17. use CUSTOMER new
  18. go top
  19. while !eof()
  20.    ? CUSTOMER->name
  21.    ? CUSTOMER->address
  22.    ? trim(CUSTOMER->city)+", "+CUSTOMER->state
  23.    ?? " "+CUSTOMER->zip
  24.    ?
  25.    for jj=1 to num_lines
  26.       ? memoline(mText,nWide,jj)
  27.    next
  28.    ?? chr(12)
  29.    skip +1
  30. enddo
  31. return NIL
  32.  
  33. // end of file CHP2308.PRG
  34.