Mioplanet Documentation Center
Resources and Help
HomeProductsMioScriptJavaScriptTechNotesPHP
   Home | MioScript | var.inc SEARCH    

  Functions
var.array.clear
var.array.count
var.array.countEx
var.array.getString
var.array.insert
var.array.remove
var.array.sort
var.count
var.dec
var.exists
var.free
var.get
var.getIndex
var.getName
var.inc
var.set

  MioScript Reference
> Statements
app...
browser...
dialog...
disk...
draw...
extern...
filename...
keyboard...
menu...
mio...
mouse...
num...
path...
pushButton...
reg...
RS232...
sci...
screen...
shortcut...
sound...
str...
system...
time...
var...
window...

Function
var.inc

Language: MioScript
Product: MioFactory


Syntax

var.inc(VariableName, Step, Maximum, RestartAt)


Parameters

VARIABLEVariableNameName of the variable.
INTStepOptional.
Number to add to the number stored in the variable.
Default value is 1.
INTMaximumOptional.
Maximum value the result can be.
INTRestartAtOptional.
Value to store in the variable when the maximum is reached.


Return value

Number.



Description

This function increments the value of a variable.




MioScript Sample Code

&number = 0
var.array.clear(myArray)

for(&ptr, 0, 16)
    var.inc(&number, 1, 10, 0)
    &myArray[&ptr] = &number
for.next

alert(&myArray[])

// Result:
// 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6