home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / xbase / library / dbase / udfs / udf3.prg < prev    next >
Text File  |  1992-05-06  |  1KB  |  38 lines

  1. /*
  2.  
  3. Author:           DAVID -(FLASH)- GORDON     CompuServ ID - 75130,3664
  4.  
  5. Originally:       Program COPYRIGHT 1991, FlashPoint
  6.  
  7. Now and Forever:  Released into the Public Domain
  8.  
  9. Note:             FlashPoint is a Registered Trademark
  10.  
  11. Purpose:          Center() was designed because every third party developer
  12.                   in the world seems to have one.  You never know how it will 
  13.                   behave until you link it into your application.  This Center 
  14.                   function will place youe message in the middle of a line in
  15.                   a non-destructive manner. (In reguards to the left and right
  16.                   screen displays)
  17. */
  18.  
  19. * Usage In Your Application
  20. ******************************************************************************
  21.  
  22. * For normal screen display or letter size printers
  23.  
  24. center( 24, "It Doesn't Get Any Better Than This !" )
  25.  
  26.  
  27. * For print where your line length is longer like with compressed print
  28.  
  29. center( 24, "It Doesn't Get Any Better Than This !", 132 )
  30.  
  31. ******************************************************************************
  32.  
  33. FUNCTION CENTER( nRow, cMessage, nMaxCol )
  34.     IIF( PCOUNT() # 3, nMaxCol := MAXCOL(), )
  35.     @ nRow, INT( ( nMaxCol - LEN( cMessage ) ) / 2 ) SAY cMessage
  36. RETURN .T.
  37.  
  38.