Hi Andi, WCB :-)

Please read my original message, i just reread it, and I beleive it perfectly 
explains the issue in details, except that you apparntly fixed the DATETIME 
support for calculations like hb_vmPlus(), though I didn't get a chance to 
review it. Here is my original message:

It appears that the definitions and usage of:

 HB_IT_DATE
 HB_IT_TIMEFLAG
 HB_IT_DATETIME

 HB_IS_DATE()
 HB_IS_DATETIME()
 HB_IS_TIMEFLAG()

is inconsistent and not designed with system wide consideration.

On quick read of all relevant sources it appears that the correct fix would be 
to make sure that HB_IT_TIMEFLAG is used indeed as a FLAG where HB_IT_DATE must 
always be be the base value. This means that all API which returns a DATETIME 
value must be corrected to:

 pItem->type = HB_IT_DATETIME;

instead of:

 pItem->type = HB_IT_TIMEFLAG;

Once this is done then naturally HB_IS_DATE() will correctly returns TRUE for 
either a DATE value or a DATETIME value, since both are indeed a form of a DATE 
value. This in turn will fix currently missing support for DATETIME type in 
calculations, etc., such as hb_vmPlus() and similar.

Finally, all existing instances of HB_IT_TIMEFLAG / HB_IT_DATETIME, 
HB_IS_DATETIME(), and HB_IS_TIMEFLAG() should be searched and verified and 
corrected when needed. All "case" structure where HB_IT_TIMEFLAG has specific 
logic separate from HB_IT_DATE must be verified to be ordered such that the 
HB_IT_TIMEFLAG/HB_IS_DATETIME() "case" is ABOVE the HB_IT_DATE "case".

Since I have not taken any active part in the addition of the HB_IT_DATETIME 
support, and I therefore may not be familiar with all subtleties of the 
implementation I will greatly appreciate the response, and appropriate fixing 
to be addressed by the original contributor[s].

As it is right now the existing support for HB_IT_DATETIME is BROKEN and 
incomplete and fixing this should be a PRIORITY IMO.
-----------------------------------------------------------------------

Will greatly appreciate your review. I would also strongly suggest consultation 
with Przmek and synching datetime support with Harbour since a language TYPE is 
a very low level core feature, which is a foundation issue with regards to RDD 
as well.

Ron 


On Oct 16, 2011, at 2:23 AM, Andi Jahja <andi.ja...@yahoo.co.id> wrote:

> Hello All,
> 
> 
> I am sorry for being too late to response as I intentionally kept
> anything relates to programming away for some times in order to have my
> mind refreshed :-)
> 
> Regarding the issues as per subject, as usual, I would be very much
> obliged if anyone can post a self-contained program to demonstrate the
> errors. I am sorry, I am too old to be patient to read narrative
> description.
> 
> Bese regards,
> 
> Andi
> 
> 
> On Tue, 16 Aug 2011 12:37:44 -0700
> Luis Krause Mantilla <lkrau...@shaw.ca> wrote:
> 
>> Ron:
>> 
>> I think it was Andi that brought all these changes from Harbour
>> so he needs to chime in....
>> 
>> On 16-08-2011 08:11, Ron Pinkas wrote:
>>> ?
>>> 
>>> On Aug 10, 2011, at 11:48 AM, Ron Pinkas<ron.pin...@xharbour.com>  wrote:
>>> 
>>>> Would greatly appreciate input from whomever was involved in adding 
>>>> DATETIME support.
>>>> 
>>>> Sent from my iPad
>>>> 
>>>> On Aug 8, 2011, at 7:02 PM, Ron Pinkas<ron.pin...@xharbour.com>  wrote:
>>>> 
>>>>> BTW, to avoid consequential incompatibility with Harbour, I suggest we 
>>>>> use compatible definitions and API where possible.
>>>>> 
>>>>> --------------------------------------------------
>>>>> From: "Ron Pinkas"<ron.pin...@xharbour.com>
>>>>> Sent: Monday, August 08, 2011 4:27 PM
>>>>> To:<xharbour-developers@lists.sourceforge.net>
>>>>> Subject: HB_IT_DATE, HB_IT_TIMEFLAG, HB_IT_DATETIME
>>>>> 
>>>>>> Hi Guys,
>>>>>> 
>>>>>> It appears that the definitions and usage of:
>>>>>> 
>>>>>> HB_IT_DATE
>>>>>> HB_IT_TIMEFLAG
>>>>>> HB_IT_DATETIME
>>>>>> 
>>>>>> HB_IS_DATE()
>>>>>> HB_IS_DATETIME()
>>>>>> HB_IS_TIMEFLAG()
>>>>>> 
>>>>>> is inconsistent and not designed with system wide consideration.
>>>>>> 
>>>>>> On quick read of all relevant sources it appears that the correct fix 
>>>>>> would be to make sure that HB_IT_TIMEFLAG is used indeed as a FLAG where 
>>>>>> HB_IT_DATE must always be be the base value. This means that all API 
>>>>>> which returns a DATETIME value must be corrected to:
>>>>>> 
>>>>>> pItem->type = HB_IT_DATETIME;
>>>>>> 
>>>>>> instead of:
>>>>>> 
>>>>>> pItem->type = HB_IT_TIMEFLAG;
>>>>>> 
>>>>>> Once this is done then naturally HB_IS_DATE() will correctly returns 
>>>>>> TRUE for either a DATE value or a DATETIME value, since both are indeed 
>>>>>> a form of a DATE value. This in turn will fix currently missing support 
>>>>>> for DATETIME type in calculations, etc., such as hb_vmPlus() and similar.
>>>>>> 
>>>>>> Finally, all existing instances of HB_IT_TIMEFLAG / HB_IT_DATETIME, 
>>>>>> HB_IS_DATETIME(), and HB_IS_TIMEFLAG() should be searched and verified 
>>>>>> and corrected when needed. All "case" structure where HB_IT_TIMEFLAG has 
>>>>>> specific logic separate from HB_IT_DATE must be verified to be ordered 
>>>>>> such that the HB_IT_TIMEFLAG/HB_IS_DATETIME() "case" is ABOVE the 
>>>>>> HB_IT_DATE "case".
>>>>>> 
>>>>>> Since I have not taken any active part in the addition of the 
>>>>>> HB_IT_DATETIME support, and I therefore may not be familiar with all 
>>>>>> subtleties of the implementation I will greatly appreciate the response, 
>>>>>> and appropriate fixing to be addressed by the original contributor[s].
>>>>>> 
>>>>>> As it is right now the existing support for HB_IT_DATETIME is BROKEN and 
>>>>>> incomplete and fixing this should be a PRIORITY IMO.
>>>>>> 
>>>>>> Ron
> 
> 
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security
> threats, fraudulent activity and more. Splunk takes this data and makes
> sense of it. Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2d-oct
> _______________________________________________
> xHarbour-developers mailing list
> xHarbour-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/xharbour-developers
------------------------------------------------------------------------------
RSA&reg; Conference 2012
Save &#36;700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
xHarbour-developers mailing list
xHarbour-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xharbour-developers

Reply via email to