Editing Decrement 1 You are editing an old version of this page. If you save it, any changes made since this version will be lost. You are editing an old version of this page. If you save it, any changes made since this version will be lost. You are not logged in. The rich text editor does not work with JavaScript switched off. Please either enable it in your browser options, or visit your preferences to switch to the old MediaWiki editor The decrement operator is a special case of [[subtraction]], and subtracts the a number from a [[variable]]. This cannot be used on literals or constants. This operator is a single instruction by itself and can only affect one variable at a time. == [[FDS]] == *{{codeblock|{{tag|variable|number}}{{tag|whitespace}}{{Code|operator|got one less}}{{tag|punctuation}}}} *{{codeblock|{{Code/experimental|operator|There was one less}}{{tag|whitespace}}{{tag|variable|number}}{{tag|punctuation}}}} *{{codeblock|{{code|keyword|I would}}{{tag|whitespace}}{{Code/experimental|operator|subtract}}{{tag|whitespace}}{{tag|value|number}}{{tag|whitespace}}{{code/experimental|operator|from}}{{tag|whitespace}}{{tag|variable|number}}{{tag|punctuation}}}} == Example == {{codeblock|{{Code|variable|Spike}}{{Code|whitespace| }}{{Code|operator|got one less}}{{Code|punctuation|.}}{{code|whitespace|<BR />}}{{Code/experimental|operator|There was one less}}{{Code|whitespace| }}{{Code|variable|cider}}{{Code|punctuation|.}}{{code|whitespace|<BR />}}{{code|keyword|I would}}{{code|whitespace| }}{{code/experimental|operator|subtract}}{{code|whitespace| }}{{code|variable|Spike}}{{code|whitespace| }}{{code/experimental|operator|from}}{{code|whitespace| }}{{code|variable|cider}}{{code|punctuation|.}}}} This subtracts {{Code|literal|1}} from the variable {{Code|variable|Spike}} and then from {{code|variable|cider}}, and then subtracts {{code|variable|Spike}} from {{code|variable|cider}}. Its Java equivalent is as follows: {{codeblock|<SOURCE LANG=java>Spike--; cider--; cider -= Spike;</SOURCE>}} == See Also == * [[Subtract]] * [[Increment]] {{Navbox/Phrases}} 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. Insert: – — … ° ≈ ≠ ≤ ≥ ± − × ÷ ← → · § Sign your username: ~~~~ Wiki markup: {{}} | [] [[]] [[Category:]] #REDIRECT [[]] <s></s> <sup></sup> <sub></sub> <code></code> <blockquote></blockquote> <ref></ref> {{Reflist}} <references/> <includeonly></includeonly> <noinclude></noinclude> {{DEFAULTSORT:}} <nowiki></nowiki> <!-- --> <span class="plainlinks"></span> Symbols: ~ | ¡ ¿ † ‡ ↔ ↑ ↓ • ¶ # ¹ ² ³ ½ ⅓ ⅔ ¼ ¾ ⅛ ⅜ ⅝ ⅞ ∞ ‘ “ ’ ” «» ¤ ₳ ฿ ₵ ¢ ₡ ₢ $ ₫ ₯ € ₠ ₣ ƒ ₴ ₭ ₤ ℳ ₥ ₦ № ₧ ₰ £ ៛ ₨ ₪ ৳ ₮ ₩ ¥ ♠ ♣ ♥ ♦ View this template This field is a spam trap. DO NOT fill it in! Edit summary Preview Mobile Desktop Show changes