[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] String problem or what am I doing wrong ?



PureBytes Links

Trading Reference Links

Thanks Tomasz. Yes I understand that the 32bit standard has it's limitations. But why am I getting correct answers for all other values ? Why is just '1' giving me a problem ? Has this to do with precision and will I always get a zero for '1' where other values give me the correct result ? Because that's what I see but do not understand. If I should have a proper answer for that, it's rather simple to modify the result accordingly with string manipulation ...
 
Problem with DateNum() for me is the difference in result before and after 2000. After 2000 gives me '1YY' etc. before 2000 'YY' ... So 2004 becomes '104'. For 1950 I am getting '50' ... Of course there is a solution for that also ...
 
Regards, Ton.
 
----- Original Message -----
Sent: Thursday, April 02, 2009 2:58 PM
Subject: Re: [amibroker] String problem or what am I doing wrong ?

All numbers in AB are industry standard 32-bit FLOATING point
which gives you 7 significant digits.

See "Range and Precision table" here:
http://en.wikipedia.org/wiki/IEEE_754-1985

So you should use
YYYMMDD encoding instead (the same as DateNum() is using)

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: "amsiev" <ton.sieverding@scarlet.be>
To: <amibroker@xxxxxxxxxps.com>
Sent: Thursday, April 02, 2009 2:22 PM
Subject: [amibroker] String problem or what am I doing wrong ?

> DatStr = "20040101";
> _TRACE("Datum "+DatStr);
> DatNum = StrToNum(DatStr);
> _TRACE("Datum "+WriteVal(DatNum,0,False));
>
> First Trace gives : 20040101 Day=01
> But second gives : 20040100 Day=00
>
> No do the same with following string :
> DatStr = "20040102";
>
> Both Traces give 20040102. Only when Day=01 I have the above
> problem. Something wrong or what am I doing wrong ?
> Please do not come with Date solutions. I know that ...
>
> Regards, Ton.
>
>
>
> ------------------------------------
>
> **** IMPORTANT PLEASE READ ****
> This group is for the discussion between users only.
> This is *NOT* technical support channel.
>
> TO GET TECHNICAL SUPPORT send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
> http://www.amibroker.com/feedback/
> (submissions sent via other channels won't be considered)
>
> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
>
> Yahoo! Groups Links
>
>
>



__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___