I have noticed an error in the HMG Reference in the HMG DOC folder. Under HMG Unicode / Ansi/Unicode Str. Func, which corresponds to file DOC\data\HMG_UNICODE_DOC\HB_Unicode_Strings.htm, it says that the difference between MEMOREAD/HB_MEMOREAD and MEMOWRIT/HB_MEMOWRIT is that the HB_ functions are not limited to 64K.
Harbour has changed the way these functions work several times, so this may have been true once. But now, all of these functions work up to the maximum Harbour string length, which I believe is 4M. The only difference between MEMOREAD and HB_MEMOREAD is that MEMOREAD removes a Ctrl-Z at the end of the file if one is present, whereas HB_MEMOREAD does not. And the only difference between MEMOWRIT and HB_MEMOWRIT is that MEMOWRIT adds a Ctrl-Z at the end of the file, whereas HB_MEMOWRIT does not.
I generally use MEMOREAD and HB_MEMOWRIT, and avoid HB_MEMOREAD and MEMOWRIT.
At one time Harbour added third parameters to MEMOREAD and MEMOWRIT to control these differences, but these were removed a few years ago. I remember this clearly because this last change broke my code. Harbour is generally pretty stable, but sometimes there are gotchas like this.
I've put a suggested revised version of HB_Unicode_Strings.htm on my site at http://kevincarmody.com/hmg/DOC/" onclick="window.open(this.href);return false;" onclick="window.open(this.href);return false;" onclick="window.open(this.href);return false; .
Kevin
Error in HMG Reference
Moderator: Rathinagiri
- dhaine_adp
- Posts: 457
- Joined: Wed Aug 06, 2008 12:22 pm
- Location: Manila, Philippines
Re: Error in HMG Reference
Hi Kevin,
Thanks in pointing that out. I'm glad that your still visiting HMG Forum.
Regards,
Danny
Thanks in pointing that out. I'm glad that your still visiting HMG Forum.
Regards,
Danny
Regards,
Danny
Manila, Philippines
Danny
Manila, Philippines
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Error in HMG Reference
Thank you Kevin to for you advise regarding MEMOREAD/HB_MEMOREAD and MEMOWRIT/HB_MEMOWRIT. This should it be corrected.
By the way there is another correction that it could be fixed too.
Please note at this topic when I mentioned "Building_HMG_applications, some parameters was changed"
This: Instead this:
By the way there is another correction that it could be fixed too.
Please note at this topic when I mentioned "Building_HMG_applications, some parameters was changed"
This: Instead this:
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein