vipsi - the friendly vip script interpreter

Functions

Numeric functions

random

<number> = Numeric functions: randomrandom <number>
<number> = Numeric functions: randomrandom ( <number> )

Create a Numeric functions: randomrandom Glossary: number, num_valnumber in range [0 .. [n.

Flow control: if … then
Flow control: try … then
The
Numeric functions: randomrandom Glossary: number, num_valnumber is a fractional Glossary: number, num_valnumber in Flow control: if … then
Flow control: try … then
the
desired range. Flow control: if … thenIf you need integers Flow control: if … then
Flow control: try … then
then
you can apply Vipsi command syntax: Functions
Functions
Glossary: Function
function
Numeric functions: intint afterwards.

Flow control: if … then
Flow control: try … then
The
Numeric functions: randomrandom Glossary: number, num_valnumber generator is seeded on program start.

As with all Vipsi command syntax: Functions
Functions
Glossary: Function
functions
which accept exactly one Vipsi command syntax: Arguments
Glossary: Arguments
argument
Flow control: if … then
Flow control: try … then
the
Separators: Round brackets "( … )"
Functions with varying return types: bracket expression "()"
parenthesis
are optional Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
may be omitted Flow control: if … then
Flow control: if … then
if the
Vipsi command syntax: Arguments
Glossary: Arguments
argument
is no Vipsi command syntax: Expressions
Glossary: Expression
expression
with Vipsi command syntax: Operators
Operators
Glossary: Operator
operators
.

e.g.:

vipsi> Numeric functions: randomrandom 5  = 1.5446008834988
vipsi> Numeric functions: randomrandom 5  = 3.4346934012137
vipsi> Numeric functions: randomrandom 5  = 3.8431410165504
vipsi> Numeric functions: randomrandom 5  = 4.5170289813541
vipsi> Instructions: procproc W6() { Flow control: returnreturn 1+Numeric functions: intint(Numeric functions: randomrandom 6) }
vipsi> W6()  3
vipsi> W6()  4
vipsi> W6()  1
vipsi>  

Valid HTML   Valid CSS