Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect default value for lLock parameter in dbAppend() documentation #357

Open
kamilprzyb2 opened this issue May 28, 2024 · 1 comment

Comments

@kamilprzyb2
Copy link

Hello,

I have found an error in the documentation for the dbAppend() function in Harbour.
The documentation currently states:

If lLock is passed a logical true (.T.) value, it will release the record locks, which allows the application to maintain multiple record locks during an appending operation. The default for this parameter is a logical false (.F.).

However, the source code for this function shows that the default value for the lLock parameter is actually true, not false.
Here is the relevant portion of the source code:

HB_FUNC( DBAPPEND )
{
   AREAP pArea = ( AREAP ) hb_rddGetCurrentWorkAreaPointer();

   if( pArea )
   {
      HB_BOOL bUnLockAll = hb_parldef( 1, HB_TRUE );
      HB_ERRCODE errCode;

      /* Clipper clears NETERR flag before APPEND */
      hb_rddSetNetErr( HB_FALSE );
      errCode = SELF_APPEND( pArea, bUnLockAll );
      hb_retl( errCode == HB_SUCCESS );
   }
   else
      hb_errRT_DBCMD( EG_NOTABLE, EDBCMD_NOTABLE, NULL, HB_ERR_FUNCNAME );
}

As you can see, the hb_parldef( 1, HB_TRUE ) line sets the default value for the lUnLockAll parameter to true.
Please update the documentation to reflect the correct default value for the parameter.
Thank you.

@alcz
Copy link
Contributor

alcz commented May 31, 2024

You're right, except the public website documentation comes from another repo:
https://github.com/vszakats/hb/blob/main/doc/en/rdddb.txt
Here repository under doc/* lacks this file at all, i think it should be readded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants