merged
authorOleksandr Gavenko <gavenkoa@gmail.com>
Mon, 12 Oct 2009 23:05:22 +0300
changeset 218 9ae36e91b0d0
parent 217 69aca8d33219 (diff)
parent 214 6db1954b50f8 (current diff)
child 220 10d0d94eabde
child 221 97171c12b447
merged
--- a/cmd.rst	Sun Oct 11 21:52:39 2009 +0300
+++ b/cmd.rst	Mon Oct 12 23:05:22 2009 +0300
@@ -1,5 +1,45 @@
 -*- outline -*-
 
+* Variables.
+
+Variable name start with letter and underscore, next chars can be letter,
+number and underscore. Variable name is case insensitive.
+
+** List of variables.
+
+  cmd> set
+...
+VAR=VALUE
+
+** Getting.
+
+Write %VAR% in place where you want insert variable VAr value.
+
+** Setting.
+
+  cmd> set /p VAR=VALUE
+
+VAR is variable name, VALUE is value.
+
+** Deleting.
+
+  cmd> set VAR=
+
+VAR is variable name.
+
+** Input from user.
+
+  cmd> set /p VAR=PROMPT
+
+VAR is variable name, PROMPT is displayed prompt.
+
+** Input from file.
+
+  cmd> set /p VAR=<FILE
+
+VAR is variable name, FILE is file name. Sfter executing VAR contain first
+line from FILE.
+
 * CMD tricks.
 
   $ set /p TOOLOUTPUT= < temp.txt