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 [email protected], Lal <kla...@...> wrote: > > Sorry, that was not precise! > > Try this: > > textC = "OrdC: "+ ", type = "+ S + ",price1="+ StrFormat("%0.3f", p); > > > > > ________________________________ > From: Barry Scarborough <razzba...@...> > To: [email protected] > 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 >
