[<<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()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson