Revision: 3560
Author: pekka.klarck
Date: Wed May 26 07:06:15 2010
Log: cleanup
http://code.google.com/p/robotframework/source/detail?r=3560
Modified:
/trunk/doc/userguide/src/CreatingTestData/Variables.txt
=======================================
--- /trunk/doc/userguide/src/CreatingTestData/Variables.txt Wed May 5
14:44:19 2010
+++ /trunk/doc/userguide/src/CreatingTestData/Variables.txt Wed May 26
07:06:15 2010
@@ -5,7 +5,6 @@
:depth: 2
:local:
-
Introduction
~~~~~~~~~~~~
@@ -206,7 +205,6 @@
List Variable Login @{USER} \
============= ======== =========== ==========
-
It is also possible to access a certain value from the list variable
with the syntax :var:`...@{name}[i]`, where :var:`i` is the index of the
selected value. Indexes start from zero, and trying to access a value
@@ -225,14 +223,16 @@
\ Title Should Be Welcome @{USER}[0]! \
============= =============== =================== ==========
-
-Starting from Robot Framework 2.0.3, it is possible to use list
-variables as scalar variables containing lists simply by replacing
-:var:`...@` with :var:`$`. This makes it possible to use list variables
-with list related keywords, for example, from from BuiltIn_ and
-Collections_ libraries. This feature works only if there is no scalar
-variable with same basename as the list variable has. In these cases
-the scalar variable has precedence and its value is used instead.
+Using list variables as scalar variables
+````````````````````````````````````````
+
+It is possible to use list variables as scalar variables containing
+lists simply by replacing :var:`...@` with :var:`$`. This makes it
+possible to use list variables with list related keywords, for
+example, from from BuiltIn_ and Collections_ libraries. This feature
+works only if there is no scalar variable with same basename as the
+list variable has. In these cases the scalar variable has precedence
+and its value is used instead.
.. table:: Using list variables as scalars
:class: example
@@ -249,7 +249,6 @@
\ Log Many @{items} \ \
============= ================ ============== ========== ==========
-
Environment variables
'''''''''''''''''''''
@@ -276,14 +275,12 @@
\ Run %{JAVA_HOME}${/}javac \
============= ======== ===================== ==========
-
Creating variables
~~~~~~~~~~~~~~~~~~
Variables can spring into existence from different sources as
described in the subsections below.
-
Variable table
''''''''''''''
@@ -295,7 +292,6 @@
strings. If other value types are needed, `variable files`_ are
probably a better option.
-
Creating scalar variables
`````````````````````````
@@ -331,7 +327,6 @@
${VERSION} = 2.0 \
============ =============== =========
-
Creating list variables
```````````````````````
@@ -357,7 +352,6 @@
... seven \ \
============ ========= ========= =========
-
Variable file
'''''''''''''
@@ -367,7 +361,6 @@
variable file syntax and taking variable files into use is explained
in section `Resource and variable files`_.
-
Setting variables in command line
'''''''''''''''''''''''''''''''''
@@ -413,7 +406,6 @@
__ `Variable priorities and scopes`_
-
Return values from keywords
'''''''''''''''''''''''''''
@@ -476,7 +468,6 @@
setting a variable in one test case and using it in another, it is
possible to use built-in keywords as explained in the next section.
-
Using built-in :name:`Set Test/Suite/Global Variable` keywords
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
@@ -510,7 +501,6 @@
__ `Setting variables in command line`_
-
Built-in variables
~~~~~~~~~~~~~~~~~~
@@ -556,7 +546,6 @@
\ Set Environment Variable CLASSPATH
${TEMPDIR}${:}${TEMPDIR}${/}foo.jar
============= ======================== =======================
===================================
-
Number variables
''''''''''''''''
@@ -576,7 +565,6 @@
Example 2 Do X ${3.14} ${-1e-4} # Do X gets floating
point numbers 3.14 and -0.0001
=========== ======== =========== ==========
===================================================
-
Boolean and None/null variables
'''''''''''''''''''''''''''''''
@@ -602,19 +590,17 @@
interpreter, Jython automatically converts :code:`None` and
:code:`null` to the correct format when necessary.
-
Space and empty variables
'''''''''''''''''''''''''
-Starting from Robot Framework version 2.0.2, it is possible to create
-spaces and empty strings using variables :var:`${SPACE}` and
-:var:`${EMPTY}`, respectively. These variables are useful, for example,
-when there would otherwise be a need to `escape spaces or empty
-cells`__ with a backslash. If more than one space is needed, it is
-possible to use the `extended variable syntax`_ like :var:`${SPACE * 5}`.
-In the following exmaple, :name:`Should Be Equal` keyword gets
-identical arguments but those using variables are easier to understand
-than those using backslashes.
+It is possible to create spaces and empty strings using variables
+:var:`${SPACE}` and :var:`${EMPTY}`, respectively. These variables are
+useful, for example, when there would otherwise be a need to `escape
+spaces or empty cells`__ with a backslash. If more than one space is
+needed, it is possible to use the `extended variable syntax`_ like
+:var:`${SPACE * 5}`. In the following exmaple, :name:`Should Be
+Equal` keyword gets identical arguments but those using variables are
+easier to understand than those using backslashes.
__ Escaping_
@@ -632,7 +618,6 @@
Empty Should Be Equal ${EMPTY} \\
============= ================= ================
================================
-
Automatic variables
'''''''''''''''''''
@@ -696,7 +681,6 @@
| ${OUTPUT DIR} | An absolute path to the `output
directory`_. | Everywhere |
+-----------------------+-------------------------------------------------------+----------------+
-
Variable priorities and scopes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -771,7 +755,6 @@
__ `Setting variables in command line`_
__ `Using built-in Set Test/Suite/Global Variable keywords`_
-
Variable scopes
'''''''''''''''
@@ -822,7 +805,6 @@
__ `Setting variables in command line`_
__ `User keyword arguments`_
-
Advanced variable features
~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -935,7 +917,6 @@
return name;
}
}
-
Many standard Python objects, including strings and numbers, have
methods that can be used with the extended variable syntax either
@@ -965,7 +946,6 @@
methods in the test data like this is already a bit questionable, and
it is normally better to move this kind of logic into test libraries.
-
Variables inside variables
''''''''''''''''''''''''''