<?xml version="1.0" encoding="utf-8"?>
<page xmlns="http://projectmallard.org/1.0/" type="guide" id="variable" xml:lang="zh-CN">

    <info>
        <link type="guide" xref="index#equation"/>
    
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Christopher Meng</mal:name>
      <mal:email>i@cicku.me</mal:email>
      <mal:years>2012-2013</mal:years>
    </mal:credit>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>ravix</mal:name>
      <mal:email>dr.neemous@gmail.com</mal:email>
      <mal:years>2013</mal:years>
    </mal:credit>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Dianjin Wang</mal:name>
      <mal:email>1132321739qq@gmail.com</mal:email>
      <mal:years>2012</mal:years>
    </mal:credit>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Cravix</mal:name>
      <mal:email>dr.neemous@gmail.com</mal:email>
      <mal:years>2013</mal:years>
    </mal:credit>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>nyanyh</mal:name>
      <mal:email>rebuilty@gmail.com</mal:email>
      <mal:years>2013</mal:years>
    </mal:credit>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>liulitchi</mal:name>
      <mal:email>xingzuo88@qq.com</mal:email>
      <mal:years>2013</mal:years>
    </mal:credit>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>玉堂白鹤</mal:name>
      <mal:email>yjwork@qq.com</mal:email>
      <mal:years>2015</mal:years>
    </mal:credit>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Mingye Wang</mal:name>
      <mal:email>arthur200126@gmail.com</mal:email>
      <mal:years>2015-2016</mal:years>
    </mal:credit>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>白铭骢</mal:name>
      <mal:email>jeffbai@aosc.xyz</mal:email>
      <mal:years>2015-2016</mal:years>
    </mal:credit>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>刘子兴</mal:name>
      <mal:email>liushuyu@aosc.xyz</mal:email>
      <mal:years>2015-2016</mal:years>
    </mal:credit>
  </info>

	<title>Variables</title>
    
    <p>
    To assign a value to a variable use the = symbol or choose the variable to assign to with the <gui>x</gui> button in <link xref="mouse">advanced mode</link>.
    A variable name must only contain upper or lower characters.
    </p>
    <example>
    <p>
    x=5
    </p>
    <p>
    value=82
    </p>
    </example>
    <p>
    Variables can be used in any equation and are substituted for their assigned value.
    Variables can be inserted using the <gui>x</gui> button.
    </p>
    <example>
    <p>
    6x+3
    </p>
    <p>
    xy−3x+7y−21
    </p>
    </example>
    <p>
    The following variables are always defined.
    </p>
    <table>
    <tr>
    <td><p>ans</p></td>
    <td><p>Result of previous calculation</p></td>
    </tr>
    <tr>
    <td><p>e</p></td>
    <td><p><link xref="logarithm">Euler's Number</link></p></td>
    </tr>
    <tr>
    <td><p>π</p></td>
    <td><p><link xref="trigonometry">Pi</link></p></td>
    </tr>
    <tr>
    <td><p>rand</p></td>
    <td><p>Random value in the range [0,1] (changes on each read)</p></td>
    </tr>
    </table>
</page>
