help please! when a string contains variable references

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I have a variable string, called formatstring The general format of the
string is : -

"somevariable + "some string text" + some variable2 + "some more text"
.... "

I want to use this variable as the argument for writeline like so : -

writeline(formatstring);

the problem i have is that writeline treats the variable formatstring
as a literal string, and doesn't realise that it includes variables
that needs replacing.

how do i get around this?

.



Relevant Pages

  • Re: C++ quirks - frustrated with secure CRT [long]
    ... TCHAR buffer; ... Size of the destination string buffer.//jabba: ... Null-terminated source string buffer. ... nSize = vsntprintf_s, _TRUNCATE, formatstring, ...
    (microsoft.public.vc.language)
  • Re: Ein bisschen va_arg
    ... allozieren, dann mit vsnprintfin ebendiesen schreiben. ... Als naechstes zaehlst Du, z.B. mit strchr, die Anzahl der Newlines, reallozierst den String entsprechend und ersetzt die Newlines. ... Damit musst Du den Formatstring parsen und alle String-Konvertierungen boese angucken. ...
    (de.comp.lang.c)
  • Re: Open Sound Control
    ... \0s at the end of the string to pad it to a 32bit boundary. ... 32bit int)) will not work with the OSC spec. ... place, you're building up a new formatString made of i, f ... 0-3 nulls, and in another place, the example he shows, uses 1 to 4 ...
    (comp.lang.tcl)
  • Re: help please! when a string contains variable references
    ... Maybe I'm just not smart enough to distill the actual problem from your ... elaborate: post some code and the error you are getting. ... evaluated into one string before it's passed on writeline? ... I want to use this variable as the argument for writeline like so: ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: StreamWriter ?
    ... Write just writes, WriteLine() adds a \r\n, as Jerry mentioned. ... so you can iterate through the file like so. ... Microsoft Expression Web Bible (upcoming) ... Dim oldLinesas String = File.ReadAllLines ...
    (microsoft.public.dotnet.framework)