PureBytes Links
Trading Reference Links
|
Tomasz,
You wrote "No caveats but ..." but, I think there is some limitations
to StrToNum(NumToStr()) combination, it does not respond accurately
for a>=1000.
Check please the value of b
a=19199;
b=StrToNum(NumToStr(a));
in explorations, it gives me 19, instead of 19199.
Dimitris Tsokakis
--- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <amibroker@xxxx>
wrote:
> Dimitris,
>
> OK, my mistake, sorry.
>
> As to your second question:
>
> > Plot(SelectedValue(L),"Moving Line",4,1);
> > is one line, just like the
> > Plot(StrToNum(NumToStr(L)),"Moving Line",4,1);
> > and I can not see what is "simpler".
> > If there are some dangers/caveats for both NumToStr(), StrToNum()
> > functions please advise.
>
> No caveats but it simply does not make sense to do this unnecessary
conversion
> that takes additional time. StrToNum( NumToStr( array) ) is
essentially (in pseudo - C):
>
> char buffer[ 50 ];
> sprintf( buffer, "%g", SelectedValue( array ) );
> number = atof( buffer );
>
> It just takes longer.
>
> SelectedValue is all that is needed and just what should be used in
this place.
>
> Also selectedvalue function was here since version 4.10 so it is
advised
> to use (where possible) functions that are present in earlier
versions to allow
> the users of old versions to run the formula.
>
> Best regards,
> Tomasz Janeczko
> amibroker.com
> ----- Original Message -----
> From: "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Sunday, October 26, 2003 7:25 PM
> Subject: [amibroker] Re: Did you ever...
>
>
> > Tomasz,
> > What ReadMe do you use ?
> > I use
> > AmiBroker 4.46.0 Beta Read Me
> > October 22, 2003 19:05
> >
> > AFAIK, it is the most recent [for us]
> > In this text, I see
> >
> > CHANGE LOG
> > CHANGES FOR VERSION 4.46.0 (as compared to 4.45.0)
> > New AFL functions
> >
> > *added NumToStr as synonum of WriteVal (as this function did
> > not 'write' anything, just returned string)
> > *added StrToNum( string ) - converts string to numbe
> >
> > and I do not see something similar to
> > # NumToStr uses "SelectedValue".#
> > Am I missing something or do you expect [from us] to read ReadMes
> > from the future ?
> > On the other side, it seems you don't like so much the use of
both
> > NumToStr(), StrToNum() functions. Is there any special reason ?
> > Because your
> >
> > Plot(SelectedValue(L),"Moving Line",4,1);
> > is one line, just like the
> > Plot(StrToNum(NumToStr(L)),"Moving Line",4,1);
> > and I can not see what is "simpler".
> > If there are some dangers/caveats for both NumToStr(), StrToNum()
> > functions please advise.
> > Dimitris Tsokakis
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko"
<amibroker@xxxx>
> > wrote:
> > > Dimitris,
> > >
> > > As written in the read me NumToStr uses "SelectedValue".
> > >
> > > Exactly the same could be achieved simpler:
> > >
> > > Plot(C,"C",1,64);
> > > Plot(SelectedValue(L),"Moving Line",4,1);
> > >
> > >
> > > Best regards,
> > > Tomasz Janeczko
> > > amibroker.com
> > > ----- Original Message -----
> > > From: "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxx>
> > > To: <amibroker@xxxxxxxxxxxxxxx>
> > > Sent: Sunday, October 26, 2003 6:50 PM
> > > Subject: [amibroker] Did you ever...
> > >
> > >
> > > > ...need this ?
> > > >
> > > > Plot(C,"C",1,64);
> > > > Plot(StrToNum(NumToStr(L)),"Moving Line",4,1);
> > > >
> > > > Move your cursor from bar to bar and see...
> > > > [amibroker 4.46.0 required]
> > > > Dimitris Tsokakis
> > > >
> > > >
> > > >
> > > > Send BUG REPORTS to bugs@xxxx
> > > > Send SUGGESTIONS to suggest@xxxx
> > > > -----------------------------------------
> > > > Post AmiQuote-related messages ONLY to:
amiquote@xxxxxxxxxxxxxxx
> > > > (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> > > > --------------------------------------------
> > > > Check group FAQ at:
> > http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> > > >
> > > > Your use of Yahoo! Groups is subject to
> > http://docs.yahoo.com/info/terms/
> > > >
> > > >
> > > >
> >
> >
> >
> > Send BUG REPORTS to bugs@xxxx
> > Send SUGGESTIONS to suggest@xxxx
> > -----------------------------------------
> > Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
> > (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> > --------------------------------------------
> > Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> >
> > Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
> >
> >
> >
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|