Wikia

FiM++ Community Wiki

Changes: Increment

Edit

Back to page

(oops there's still some decrement grammar here.)
(Example: Removed "run paragraph" keyword from line.)
 
Line 16: Line 16:
 
{{codeblock|{{Code|variable|FiM}}{{Code|whitespace| }}{{Code|operator|got one more}}{{Code|punctuation|.}}{{code|whitespace|<BR
 
{{codeblock|{{Code|variable|FiM}}{{Code|whitespace| }}{{Code|operator|got one more}}{{Code|punctuation|.}}{{code|whitespace|<BR
 
/>}}{{Code/experimental|operator|There was one more}}{{Code|whitespace| }}{{Code|variable|Pinkie Pie}}{{Code|punctuation|.}}{{code|whitespace|<BR
 
/>}}{{Code/experimental|operator|There was one more}}{{Code|whitespace| }}{{Code|variable|Pinkie Pie}}{{Code|punctuation|.}}{{code|whitespace|<BR
/>}}{{code|keyword|I would}}{{code|whitespace| }}{{code/experimental|operator|add}}{{code|whitespace| }}{{code|literal|15}}{{code|whitespace| }}{{code/experimental|operator|to}}{{code|whitespace| }}{{code|variable|Pinkie Pie}}{{code|punctuation|.}}}}
+
/>}}{{code/experimental|operator|add}}{{code|whitespace| }}{{code|literal|15}}{{code|whitespace| }}{{code/experimental|operator|to}}{{code|whitespace| }}{{code|variable|Pinkie Pie}}{{code|punctuation|.}}}}
   
 
This adds {{Code|literal|1}} to the variable {{Code|variable|FiM}} and then to {{code|variable|Pinkie Pie}}, and then adds {{code|literal|15}} to {{code|variable|Pinkie Pie}}.
 
This adds {{Code|literal|1}} to the variable {{Code|variable|FiM}} and then to {{code|variable|Pinkie Pie}}, and then adds {{code|literal|15}} to {{code|variable|Pinkie Pie}}.

Latest revision as of 22:03, August 6, 2015

Icon Warning  EXPERIMENTAL  Icon Warning
This article or section contains experimental features. Use caution when implementing them, as they may be removed or changed at any time.

The increment operator is a special case of addition, and adds the fixed value 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.

FDS Edit

Example Edit

FiM got one more.
Icon Warning There was one more Pinkie Pie.
Icon Warning add 15 Icon Warning to Pinkie Pie.

This adds 1 to the variable FiM and then to Pinkie Pie, and then adds 15 to Pinkie Pie.

Its Java equivalent is as follows:

FiM++;
++PinkiePie;
PinkiePie += 15;

See Also Edit


Around Wikia's network

Random Wiki