Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Proclip2 Library - <b> sprint() </b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 SPRINT() 

          Add new flexibility to your programming with the SPRINT command.
          This function allows display of a character string on the screen
          using a different color attribute than that which is currently
          selected through SET COLOR TO.  The function will either retain the
          current cursor position or move the cursor to the end of the newly
          displayed string.  Not subject to SET DEVICE TO so updating of
          screen and printer can be performed easily.


      Format: 

               sprint([row, col,] string [,attr][,type])

                    or

               @ x,y say sprint(string [,attr][,type])


      Parameters: 

             row.......  OPTIONAL .  Numeric variable or constant which
                         informs the function of the row (line) number on
                         which to begin display of the string.  Use of ROW
                         assumes a COL will be specified.  ROW must be a
                         valid video line number between 0 and 24 inclusive.
                         If the string will not fit on ROW it will be wrapped
                         to the following line (if any).

             col.......  OPTIONAL .  Numeric variable or constant which
                         informs the function of the column number on which
                         to begin the display of the string.  Use of COL
                         assumes the use of ROW.  COL must be a valid video
                         column number between 0 and 79 inclusive.  Using the
                         format of sprint(row,col...) will not reposition the
                         cursor, the cursor position will not change.  Using
                         the @ x,y say... format will reposition the cursor
                         to the end of the displayed string.

                         sprint(row,col...)
                                        After printing the string, the cursor
                                        will be returned to the position last
                                        known by Clipper.  In other words the
                                        cursor will not move.

                         @...SAY sprint(...)
                                        After printing the string, the cursor
                                        will be moved to the end of the
                                        string just printed.  Acts similar to
                                        the standard @...SAY... in this
                                        fashion but you still get the color
                                        override capability.

               string....Character string variable or constant which will be
                         displayed beginning at the requested position.

              attr... OPTIONAL .  Character string variable or constant,
                         non case sensitive, which informs the function what
                         color attributes to use when displaying.  If not
                         specified the function will use the attribute
                         currently displayed on the screen at the starting
                         position for the string.

                                  (valid colors)
                          black                          N
                          blue                           B
                          green                          G
                          cyan                           BG
                          red                            R
                          magenta                        RB
                          brown                          GR
                          white                          W
                          intense                        +
                          blink                          *

             type... OPTIONAL. Logical variable or constant instructing
                         the function to use DMA updating or not.

                         .T.            DEFAULT.  If not specified, the
                                        function will use DMA screen
                                        updating.

                         .F.            Setting this flag to a logical false
                                        will cause the function to use the
                                        standard BIOS INT 10H for screen
                                        updating.
      Examples: 

               1.   Print a warning message on the screen but do not
                    reposition the cursor.  Further, print the message in
                    bright red on a black background even though those colors
                    are not currently selected.

                    .
                    .
                    .
                    sprint(24,00,"Don't press that key again!","+r/b")
                    .
                    .
                    .

               2.   Print a message on the screen and reposition the cursor
                    to the end of the message.  Use the intense white on a
                    black background.

                    .
                    .
                    .
                    @ 10,00 say sprint('Enter your password: ','+w/b')
                    .
                    .
                    .


      Returns: 

               null......A null character string is returned thereby allowing
                         SPRINT to be used "in line" with a standard Clipper
                         @... SAY...  (eg.  @ X,Y SAY "Hi" + sprint(...) is
                         valid).


      Cautions: 

               None.


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