home *** CD-ROM | disk | FTP | other *** search
- /*
- Program: SPREAD()
- System: GRUMPFISH LIBRARY
- Author: Greg Lief
- Copyright (c) 1988-90, Greg Lief
- Clipper 5.x version
- Compile instructions: clipper spread /n/w/a
- Displays a character string from the center out
- */
-
- //───── begin preprocessor directives
-
- #include "grump.ch"
-
- //───── end preprocessor directives
-
- function Spread(cmsg, nrow, ndelay, nmidpoint)
- local nlength := len(cmsg), xx, yy
- default ndelay to 8
- default nmidpoint to 40
- for xx = 1 to int(nlength / 2)
- @ nrow, nmidpoint - xx ssay substr(cmsg, 1, xx) + ;
- substr(cmsg, nlength + 1 - xx, xx)
- for yy = 1 to ndelay
- next
- next
- //───── if message was of odd length, redraw entire thing now
- if nlength % 2 == 1
- @ nrow, nmidpoint - xx say cmsg
- endif
- return NIL
-
- * end function Spread()
- *--------------------------------------------------------------------*
-
- * eof spread.prg
-