L3DT users' wiki
Large 3D terrain generator

decr

Description

Decrement the value of an integer.

Function prototype

int64 incr <varref:Var>

Arguments

Name Type Comment
Var varref A reference to the integer variable to be decremented.

Return value

The value of Var after it was decremented by 1.

Example

// create a new integer 'i', and set it to 10
int i
set i 10

// decrement the value of 'i' four times, and echo to log 
echo <zs:decr i>
echo <zs:decr i>
echo <zs:decr i>
echo <zs:decr i>

… the output of which is written to the event log by echo as:

9
8
7
6

Comments

Supported types

The following variable types of the argument Var are supported by decr:

  • char
  • sbyte (signed byte)
  • byte
  • short
  • ushort
  • int
  • uint
  • int64

See also

 
plugins/general/zeoscript/reference/functions/decr.txt · Last modified: 2017/08/31 04:56 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki