Re: help please! when a string contains variable references

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



Maybe I'm just not smart enough to distill the actual problem from your
post, so (unless someone posts the answer in the mean time :)) please
elaborate: post some code and the error you are getting.

The main part I'm confused about is: what do you want to achieve? Do
you need to do something like PHP where you can say "time of the day is
$somescalar at this moment"? Or do you want the parameter to be
evaluated into one string before it's passed on writeline?

Regards,
Jeroen


CCLeasing wrote:
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: 15 Answers to Creationists Nonsense Claims
    ... string de novo; the sub-routine that assigns a value to ... intermediate strings (aka the utility function) must know the ... desired outcome in advance. ... I found two recent posts from him where he does elaborate: ...
    (talk.origins)
  • Re: 15 Answers to Creationists Nonsense Claims
    ... string de novo; the sub-routine that assigns a value to ... intermediate strings (aka the utility function) must know the ... I found two recent posts from him where he does elaborate: ... His second post includes the following which seems to provide some hint ...
    (talk.origins)
  • Re: 15 Answers to Creationists Nonsense Claims
    ... string de novo; the sub-routine that assigns a value to ... intermediate strings (aka the utility function) must know the ... I found two recent posts from him where he does elaborate: ... means any better after reading those posts than I did before. ...
    (talk.origins)
  • RE: Distill some string from whole string
    ... Distill some string from whole string ... I want to distill /usr/command and assign to a variable, ... Is it the / or usr or command or ????? ... It is intended only for the recipient named and for the express purposedescribed therein. ...
    (perl.beginners)
  • 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)