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

[amibroker] Re: strFormat - how to insert strings



PureBytes Links

Trading Reference Links

Yea I was doing that but that's waked. Tomasz said "StrFormat and printf behave identically except that printf writes output to the window, while StrFormat does not write anything to output window but returns resulting string instead." He sends us to the MS website for a description of the valid operators. He says the ones for integers don't work but never said string operators are not supported.

printf in C allows constructing compound strings with various types of input. I tried the %s and %S in printf and that does not work either. Either I am not using the correct format operator or printf does not support string input. 

Is it really true that Ami's printf and strFormat cannot build compound strings with numerical and string input?

Barry

--- In amibroker@xxxxxxxxxxxxxxx, Lal <klal25@xxx> wrote:
>
> Sorry, that was not precise!
> 
> Try this:
> 
> textC   =   "OrdC: "+ ", type = "+ S + ",price1="+ StrFormat("%0.3f", p); 
> 
> 
> 
> 
> ________________________________
> From: Barry Scarborough <razzbarry@xxx>
> To: amibroker@xxxxxxxxxxxxxxx
> Sent: Tuesday, 7 April, 2009 15:04:36
> Subject: [amibroker] strFormat - how to insert strings
> 
> 
> I am trying to build a string using the following formula. StrFormat will not allow me to insert a string into the string. My C manual says us a %s but Ami does not allow that. I tried upper and lower case S. Neither work. What should I use? 
> 
> s = "MKT"; 
> p = 1.235; 
> textC = StrFormat("OrdC: ,type= %s ,price1= %1.4f", s, p);
> printf(textC) ;
> 
> Thanks,
> Barry
>




------------------------------------

**** 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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/