FiM++ Community Wiki

Editing

Increment

1
  • The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit. If you are undoing an edit that is …
Latest revision Your text
Line 1: Line 1:
 
{{experimental|has}}
 
{{experimental|has}}
   
The increment operator is a special case of [[addition]], and adds the fixed value {{Code|literal|1}} to a '''variable'''. This cannot be used on literals or constant variables. This operator is a single instruction by itself and can only be used on one variable at a time.
+
The increment operator is a special case of [[addition]], and adds the fixed value {{Code|literal|1}} from a '''variable'''. This cannot be used on literals or constant variables. This operator is a single instruction by itself and can only be used on one variable at a time.
   
 
== [[FDS]] ==
 
== [[FDS]] ==
 
*{{codeblock|{{tag|variable|number}}{{tag|whitespace}}{{Code|operator|got one more}}{{tag|punctuation}}}}
 
*{{codeblock|{{tag|variable|number}}{{tag|whitespace}}{{Code|operator|got one more}}{{tag|punctuation}}}}
**Increases the given variable by 1 and returns the variable's previous value.
+
Increases the given variable by 1 and returns the variable's previous value.
   
 
*{{codeblock|{{Code/experimental|operator|There was one more}}{{tag|whitespace}}{{tag|variable|number}}{{tag|punctuation}}}}
 
*{{codeblock|{{Code/experimental|operator|There was one more}}{{tag|whitespace}}{{tag|variable|number}}{{tag|punctuation}}}}
**Increases the given variable by 1 and returns the variable's new value.
+
Increases the given variable by 1 and returns the variable's new value.
   
 
*{{codeblock|{{Code/experimental|operator|add}}{{tag|whitespace}}{{tag|value|number}}{{tag|whitespace}}{{code/experimental|operator|to}}{{tag|whitespace}}{{tag|variable|number}}{{tag|punctuation}}}}
 
*{{codeblock|{{Code/experimental|operator|add}}{{tag|whitespace}}{{tag|value|number}}{{tag|whitespace}}{{code/experimental|operator|to}}{{tag|whitespace}}{{tag|variable|number}}{{tag|punctuation}}}}
**Increases the given variable by the value of the given number.
+
Increases the given variable by the value of the given number.
   
 
== Example ==
 
== Example ==
  Loading editor
Below are some commonly used wiki markup codes. Simply click on what you want to use and it will appear in the edit box above.

View this template