Difference between revisions of "Command/getvariable"

From Wiki
Jump to navigation Jump to search
m (remove wrong link)
 
(One intermediate revision by the same user not shown)
Line 6: Line 6:
 
== [[Help:Reference|Syntax]] (autogenerated) ==
 
== [[Help:Reference|Syntax]] (autogenerated) ==
 
<syntax>getvariable</syntax>
 
<syntax>getvariable</syntax>
 
== [[Help:Reference|Syntax]] ==
 
<table cellspacing="4" cellpadding="2" class="cmd">
 
  <tr>
 
    <td colspan="2" class="cmd">\getvariable<!--
 
      --><span class="first">{...}</span><!--
 
--><span class="second">{...}</span><!--
 
--></td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">{...}</td>
 
    <td>''namespace?''</td>
 
  </tr>
 
  <tr valign="top" class="second">
 
    <td class="cmd">{...}</td>
 
    <td>''variable name?''</td>
 
  </tr>
 
</table>
 
  
 
== Description ==
 
== Description ==
Line 30: Line 12:
 
== Example ==
 
== Example ==
 
<texcode>
 
<texcode>
 +
\setvariable{myvars}{uno}{1}
 +
 +
\getvariable{myvars}{uno} % result: 1
 
</texcode>
 
</texcode>
  
  
 
== See also ==
 
== See also ==
* {{cmd|setupvariables}}
+
* {{cmd|setvariable}}
 +
* {{cmd|setvariables}}
 
* {{cmd|env}}
 
* {{cmd|env}}
  

Latest revision as of 11:12, 28 April 2022

\getvariable

Syntax (autogenerated)

\getvariable{...}{...}
{...}name
{...}key


Description

Retrieve the value of the named variable in the specified namespace.

Example

\setvariable{myvars}{uno}{1}

\getvariable{myvars}{uno} % result: 1


See also

Help from ConTeXt-Mailinglist/Forum

All issues with: