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

         Writes on a file

    Syntax:

         fbWrite ( nHandle, cBuffer, nBuffer, nWrite, ;
                   cFile, lForce ) -> lExito

         nHandle : The file handle of the file.
         cBuffer : The buffer to write to the file.
         nBuffer : The number of bytes to be written.
         nWrite  : Variable that returns the numaber of bytes written.
         cFile   : The name of the file.
         lForce  : Logic value to force to nBuffer will be the same than
                   nWrite.

    Description:

         Writes nBuffer bytes from cBuffer to nHandle file. With cFile
         we give the File name to the one that we're accessing if it
         has to show any access error message. lForce indicates if
         it's .T. that the reading must be of nBuffer bytes and doesn't
         return till nWrite will be that amount. If lForece is .F.
         returns although nWrite will be lower than nBuffer. Forget
         the retries cause the same function checks all of that.

    Return:

         If there's any error returns .F. if not, returns .T.

    Example:

         cFile     := "Fast.txt"
         nHand     := fbOpen ( cFich, 2 )
         nWrite    := 100
         nBuffer   := 100
         cBuffer   := Space ( nBuffer )
         lForce    := .T.
         If ! fbWrite( nHand, cBuffer, nBuffer, @nWrite, cFich, lForce )
           Warning( "The reading has been unsuccessful" )
         Else
           Warning( Str( nWrite ) + " must be the same " + Str( nBuffer ) )
         EndIf
         fbClose ( { nHand } )

See Also: fbOpen() fbClose() fbCreate() fbRead()

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