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> clock() </b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 CLOCK() 


          Many programmers have wanted to display the current time on the
          screen from with Clipper, but due to the overhead involved in
          trying to keep it correct have dismissed the idea.  Now, with
          CLOCK, you simply specify the location, format and color attributes
          and PROCLIP2 will maintain the dynamic clock for you.  Formats
          include military (24 hour) or meridian (12 hour), with or without
          seconds displayed.  If no seconds are selected the colon between
          the hour and minutes will pulse every second re-enforcing the fact
          that it is keeping time.


      Format: 

               clock('on' | 'off' [,format] [,seconds][,attr] )


      Parameters: 

               'on'......Character string variable or constant, non case
                         sensitive, which instructs the CLOCK to become
                         active at the current cursor position.  Mutually
                         exclusive with the "off" parameter.

               'off'.....Character string variable or constant, non case
                         sensitive, which instructs the CLOCK to deactivate
                         itself.  The constant updating of the clock will
                         cease but the clock will remain on the display.
                         Mutually exclusive with the "on" parameter.

              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 position
                         indicated.

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

               format... OPTIONAL. Character string variable or constant,
                         non case sensitive, which informs the function of
                         the display format to use.

                         '12 hour'      DEFAULT.  Instructs the CLOCK
                                        function to display in standard 12
                                        hour format (eg. 10:00pm)

                         '24 hour'      instructs the CLOCK function to
                                        display in military format (eg.
                                        22:00)

               seconds.. OPTIONAL. Character string variable or constant,
                         non case sensitive, which informs the function
                         whether to display the current seconds or not.

                         'seconds'      instructs the CLOCK function to
                                        display the seconds in the current
                                        format.

                         'no seconds'   DEFAULT.  Instructs the CLOCK
                                        function to suppress display of the
                                        seconds and activate the pulse of the
                                        colon separator in hh:mm


      Examples: 

               1.   At row #00 and column #00 display the clock in military
                    format with the seconds displayed using a  white
                    background with black characters.

                    .
                    .
                    .
                    @ 0,0 say clock('on','24 hour','seconds','n/w')
                    .
                    .
                    .

               2.   Disable the clock.

                    .
                    .
                    .
                    clock('off')
                    .
                    .
                    .


      Returns: 

               Nothing.


      Cautions: 

               This function should not be placed into an overlay as it is
               interrupt driven.  Any error routines which determine an
               unrecoverable runtime error has occurred should disable this
               function prior to exiting the program.  Failure to follow this
               caution may result in the computer locking up.

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