[ar] [ast] [bg] [br] [ca] [co] [cpf] [cs] [da] [de] [en] [eo] [es] [eu] [fa] [fon] [fr] [gl] [id] [it] [ja] [lb] [nl] [oc] [pl] [pt] [ro] [ru] [sk] [sv] [tr] [uk] [vi] [zh] Espace de traduction



July 2010 — updated on : June 2010

All the versions of this article:

The |moins{xx} filter is a mathematical operation filter.
It returns the result of subtracting (the difference) the value of xx from the value of the preceding tag.

If the tag’s output is not a numeric type, it will be considered as being 0 (zero) and the filter will simply return the negative value of the argument that was passed to it: [(#TEXTE|moins{18})] will return «-18».

It is possible to assign a negative number as the argument to the filter: [(#TOTAL_BOUCLE|moins{-5.2})], but this would undoubtedly be more clear if we were instead to use the |plus (add) filter.

Warning: if xx is a floating point number, it must be written with a period as per the English method as opposed to being written with a comma as some European languages do: [(#TOTAL_BOUCLE|moins{5.2})].

See also the |modulo, |mult, |div and |plus filters.

Show the template of this page Site powered by SPIP | Translation area | Private area