Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FUNCky - <b>name:</b> <b>amacprint() - macro expand and print array contents</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Name:     amacprint() - macro expand and print array contents
  Usage:    <logical> = amacprint(<array>)
  Params:   array <array> - an array of Clipper expressions to
            be macro expanded and sent to the printer.

  Returns:  .T. if entire array was printed, .F. if error occurred

 ---------------------------------- Example ---------------------------------

            The following example uses the amacprint() function to
            macro expand the Clipper expressions contained in the
            array to print a standard mailing label. Using this
            same method, you can place your Clipper expressions in
            a text file, read them into an array with afileread(),
            and then macro expand those expressions and send the
            results to the printer. That allows you to modify
            your print routines without having to recompile your
            application. Make sure all your expressions evaluate
            to type string when using this function.

                 declare printarray[4]

                 printarray[1] = "trim(fname)+[ ]+lname"
                 printarray[2] = "cname"
                 printarray[3] = "trim(address)+[ ]+state+zip"
                 printarray[4] = "chr(13)+chr(10)"

                 use phone index lname
                 do while ! eof()
                      amacprint(array)
                      skip 1
                 enddo
                 close databases

  Note:     This function is an example function contained on the
            source disk in the file c_amacpr.prg.

See Also: afileread() arrayprint()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson