WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Strings

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

How to Output the Value of a Variable within a String

Keywords: 	 ouput string value

Question:

I want to output a the value of a variable stored within a string. For example
var x = value of x
string = "x"
I want to get value of x. In other languages there is a function called "eval" or "evaluate". Does winbatch have a similar function?

Answer:

x=1234
stringx="x"

valuestringx= %stringx%

Message(stringx,valuestringx)

Article ID:   W14503
Filename:   Output the Value in a String.txt
File Created: 2000:03:30:11:47:12
Last Updated: 2000:03:30:11:47:12