mirror of
https://github.com/processing/processing4.git
synced 2026-02-12 01:50:44 +01:00
59 lines
1.3 KiB
XML
59 lines
1.3 KiB
XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
<root>
|
|
<name>= (assign)</name>
|
|
|
|
<category>Structure</category>
|
|
|
|
<subcategory></subcategory>
|
|
|
|
<usage>Web & Application</usage>
|
|
|
|
<example>
|
|
<image></image>
|
|
<code>
|
|
int a;
|
|
a = 30; // Assigns for value 30 to the variable "a"
|
|
a = a + 40; // Assigns the value 70 to the variable "a"
|
|
</code>
|
|
</example>
|
|
|
|
<description>
|
|
Assigns a value to a variable. The "=" sign does not mean "equals", but is used to place data within a variable. The "=" operator is formally called the assignment operator. There are many different types of variables (int, floats, strings, etc.) and the assignment operator can only assign values which are the same type as the variable it is assigning. For example, if the variable is of type <b>int</b>, the value must also be an <b>int</b>.
|
|
</description>
|
|
|
|
<syntax>
|
|
<c>var</c> = <c>value</c>
|
|
</syntax>
|
|
|
|
<parameter>
|
|
<label>var</label>
|
|
<description>any valid variable name</description>
|
|
</parameter>
|
|
|
|
<parameter>
|
|
<label>value</label>
|
|
<description>any value of the same type as the variable. For example, if the variable is of type "int", the value must also be an int</description>
|
|
</parameter>
|
|
|
|
<returns></returns>
|
|
|
|
<related>
|
|
+= (add assign)
|
|
-= (subtract assign)
|
|
</related>
|
|
|
|
<availability>1.0</availability>
|
|
|
|
<type>Operator</type>
|
|
|
|
<partof>PDE</partof>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</root>
|