home *** CD-ROM | disk | FTP | other *** search
- /*
- Listing 23.8 Form letter sample
- Author: Joe Booth
- Excerpted from "Clipper 5: A Developer's Guide"
- Copyright (c) 1991 M&T Books
- 501 Galveston Drive
- Redwood City, CA 94063-4728
- (415) 366-3600
- */
-
- //───── NOTE: must compile with the /N option!
-
- STATIC nWide := 60
-
- function form_lett( mText )
- LOCAL num_lines := mlcount(mText, nWide), jj
- use CUSTOMER new
- go top
- while !eof()
- ? CUSTOMER->name
- ? CUSTOMER->address
- ? trim(CUSTOMER->city)+", "+CUSTOMER->state
- ?? " "+CUSTOMER->zip
- ?
- for jj=1 to num_lines
- ? memoline(mText,nWide,jj)
- next
- ?? chr(12)
- skip +1
- enddo
- return NIL
-
- // end of file CHP2308.PRG
-