Page 1 of 1

Error in HMG Reference

Posted: Wed Oct 22, 2014 9:24 pm
by kcarmody
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

Re: Error in HMG Reference

Posted: Thu Oct 23, 2014 3:52 am
by dhaine_adp
Hi Kevin,

Thanks in pointing that out. I'm glad that your still visiting HMG Forum.


Regards,

Danny

Error in HMG Reference

Posted: Thu Oct 23, 2014 12:22 pm
by Pablo César
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:
Screen_03.PNG
Screen_03.PNG (25.72 KiB) Viewed 2855 times
Instead this:
Screen_04.PNG
Screen_04.PNG (25.99 KiB) Viewed 2850 times