Hi,

Viktor Szakáts wrote:
Or, we can keep HB_BYTE and HB_SCHAR. (and drop HB_CHAR and HB_UCHAR)

Any further elaboration?

I'm a little lost on the whole idea of type name change. I guess we have two purposes:
1) drop Windows specific defines, like LONG, ULONG, BYTE, etc.
2) solve some platform limit problems like array limit, string limit problems. We are using long type for this, but 64-bit windows uses 32-bit long values. So, we need to change index to have a size of pointer.

I guess the first problem could be solved just replacing LONG, ULONG, SHORT, USORT by long, unsigned long, short, unsigned short. Why do we define a new types like HB_LONG, HB_ULONG, HB_SCHAR? Just to have a shorter type name?

So solve the second problem, we need to define the expected limits of some values, like expected function parameter count, expected dynamic symbol table item count, expected array size, expected string size. F.e., if the decide we need to have strings as big as memory can contain, we need string length to have a size of pointer. In most platforms long (or unsigned long) is OK, but on 64-bit Win it is to small, so we define a new type HB_SIZE and use it address all string, array, hash, etc, item count. If we are satisfied with some existing type we do not need a new harbour type. F.e, if int type fits function parameter count (it can be negative, because -1 means return value, it is enough width on DOS, 32-bit, 64-bit platforms), we can use int to store param count/number. If we want to have another type like HB_PARAMCOUNT we can have it, but it could be a big job to find all variables that stores param count.

I'm not a guru of different OSes, and I do not imaging how character and byte types can have width different from 8-bit. So, I have no comments on topics like:
    - Deleted HB_I8 and HB_U8 types. Practice shows that
      HB_UCHAR and HB_SCHAR are used instead of these.

Does it mean that we decided to definitely drop support for platforms
which do not use 8 bit characters?



Regards,
Mindaugas


P.S. perhaps I had to start a message from this, but I see Viktor is making a huge worik on type name change, and I see Przemek is a little sceptical, because he sees some bad sides of this change. I guess we should discuss/deside, what do we want to do, and what are the ways to reach our goal.


_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to