inc

Summary

Increments either the input or the first parameter with one.

Usage

$input_number|inc( value )

Parameters

NameTypeDescriptionRequired
value number Value to increment. Only if input is omitted.

Returns

Number (input/parameter incremented with one).

Description

This operator increments either the input or the first parameter with one. If both are given, it is the value of the parameter that will be incremented and returned.

Examples

Example 1

{255|inc}

returns 256.

Example 2

{let i=255}

{set i=inc( $i )}

{$i}

{/let}

returns 256.

Comments

log in or create a user account to comment.

Contents

Reference

Database diagram
Template operators
    PDF
    Arrays
    Data extraction
    Formatting
    Images
    Logic
    Mathematics
       abs
       ceil
       dec
       div
       floor
       inc
       max
       min
       mod
       mul
       round
       sub
       sum
    Miscellaneous
    Strings
    URLs
    Variables
Template functions
Data fetching
Modules
XML tags


Created

05/02/2004
11:46:55 am
by Balazs Halasy

Last updated

11/02/2004
10:58:08 am
by Balazs Halasy

Authors

Balazs Halasy



This page is part of the Exponential documentation. The documentation is available under the GNU Free Documentation License. All contributions will be released under the terms of this license.