Computing.Net > Forums > Programming > Extract Variable Value

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Extract Variable Value

Reply to Message Icon

Name: hanixox
Date: December 18, 2008 at 07:38:52 Pacific
OS: DOS
CPU/Ram: Intel
Product: Intel / P4
Comment:

Let's see how well I can explain this,Here is my code :
-------
1- setLocal enabledelayedexpansion
2- :go
3- set 11=A
4- set 12=B
5- set /a n+=1
6- set 1!n!
7- Set X= ??What!!
8- pause
9- goto go
-------
at line 6 the result is 11=A , I am not much of a programmer, but I Know that "11" is Variable and "A" is value of the Variable .
I want to make X = the value of "11" variable that appear at executed line 6 .

in this case : the Value of (X) will be (A) at the first time
and (B) when Enter button pressed.

is that a possible thing ?

Any help .



Sponsored Link
Ads by Google

Response Number 1
Name: klint
Date: December 18, 2008 at 07:56:43 Pacific
Reply:


Set X=!1%n%!


0

Response Number 2
Name: hanixox
Date: December 18, 2008 at 08:26:41 Pacific
Reply:

Thank you klint

Thank you very much

I have renewed my hope


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


batch script to convert t... Batch file to copy folder



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Extract Variable Value

Extracting variable from txt file? www.computing.net/answers/programming/extracting-variable-from-txt-file/10986.html

Getting the value of a variables value www.computing.net/answers/programming/getting-the-value-of-a-variables-value/18758.html

DOS - batch variables www.computing.net/answers/programming/dos-batch-variables/15058.html