Template:ICounter

From Moegirlpedia
Jump to: navigation, search
Template-info.svg Template Documentation  [View] [Edit] [History] [Refresh]

Parameters

  1. new: change object
    • First, you should declare a counter object by using {{iCounter|new|<name>}}.
      • This is the method to change the current anonymous counter. You can use this method to access or set a counter quickly.
  2. reset: clear
    • You can initialize a counter by using {{iCounter|<name>|0}}.
      • To clear an anonymous counter, use {{iCounter|reset}} or {{iCounter|0}}.
  3. ++, --: count
    • You can use {{iCounter|<name>|++}}{{iCounter|<name>|--}}to increase or decrease a counter.
      • To increase or decrease an anonymous counter, use {{iCounter|++}}{{iCounter|--}}.
  4. <number>: assignment
    • You can directly assign the counter like {{iCounter|<name>|66}}.
      • To assign an anonymous counter, you can type like {{iCounter|66}}.
  5. get, count: get the value
    • You can get the value of a counter by using {{iCounter|count|<name>}} or {{iCounter|get|<name>}}.
      • To get the value of an anonymous counter, use {{iCounter|count}} or {{iCounter|get}}

See also

  • {{iCounter}} (counter meta template)
  • {{counter}} (mainly for generating unique sequence number)
  • {{c}} (for anonymous #forargs parameter)
  • {{n}} (counters in articles)