Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- GT_LIB v1.0 Reference Guide Release 1.0 - <b>function to lock a datafile/record and return the success</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 Function to lock a datafile/record and return the success
------------------------------------------------------------------------------

 Syntax

         GT_Locking(<lFile>,[<nSeconds>],[<nPause>]) -> lSuccess

 Arguments:

      <lFile> is a logical switch, .T. = Lock the file
      and .F. is just the record.

      <nSeconds> is the number of seconds to wait before
      giving up.

      <nPause> is thetime interval to pause for before a
      retry.

 Returns:

      GT_Locking() returns logical success.

 Description:

      Function to lock a datafile/record and return the
      success. If at first it fails it will wait the
      specified number of seconds before aborting.

 Examples:

      // Reset a counter
      IF GT_Locking(.F.,60,0.5)
          Field->Count := 0
      ELSE
          ? 'Error'
      ENDIF

 Source: GT_LOCKI.PRG

 Author:  Martin Bryant

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