LB Booster
Programming >> Compatibility with LB4 >> Windows Constants
http://lbb.conforums.com/index.cgi?board=compatibility&action=display&num=1479189977
Windows Constants
Post by Richard Russell on Nov 15th, 2016, 05:06am
LB 4 and LBB differ in respect of the Windows Constants that are accepted (not least because I am not aware of there being a definitive list of which constants LB 4 accepts). My hope is that the LBB set of constants is a superset of the LB 4 one, but of course I don't know that for sure - if you ever discover a Windows Constant that LB 4 knows about but LBB doesn't please let me know.
Although the set of constants differs between LB 4 and LBB one would hope that the values don't, but in fact in one (hopefully unique) case that currently isn't true: _INVALID_HANDLE_VALUE is -1 in LBB and 4294967295 in LB 4! This accidental difference comes about because -1 is the official value of the constant in Microsoft documentation, but conventionally in Liberty BASIC handles are unsigned (ulong).
In the interests of compatibility I plan to change the value of _INVALID_HANDLE_VALUE in the next release of LBB, although of course that could conceivably result in an existing program (written solely for LBB) failing if it declares a handle as long rather than ulong. I will have to hope that isn't the case.
It raises the interesting question of why handles are conventionally assumed to be unsigned in Liberty BASIC, especially when you consider that in Windows they are signed:
Code:
If anybody knows I would be interested.
Richard.