vipsi - the friendly vip script interpreter

Functions

Functions with varying return types

call

<value> = Functions with varying return types: call
Instructions: call
call
( <filename> ) <value> = Functions with varying return types: call
Instructions: call
call
( <filename>, <value> [,…] )

Functions with varying return types: call
Instructions: call
Call
another vip Example Scripts: CGI Scripts
Example Scripts: Scripts
script
like a Vipsi command syntax: Procedures
Data Types: Procedures
Glossary: Procedure
procedure
with parameters Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
Flow control: returnreturn a result.

Calling another vip Example Scripts: CGI Scripts
Example Scripts: Scripts
script
is very similar to executing a Modes of Operation: Shell Scriptsshell script except that Flow control: if … then
Flow control: try … then
the
Example Scripts: CGI Scripts
Example Scripts: Scripts
script
can be passed Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
Shell Scripts: Return values
Appendix: Return values
return values
of any type. Flow control: if … then
Flow control: try … then
The
called Example Scripts: CGI Scripts
Example Scripts: Scripts
script
shares Flow control: if … then
Flow control: try … then
the
Interactive Shell: Preferencespreferences of Flow control: if … then
Flow control: try … then
the
current context but cannot access it's Glossary: Variable, var_refvariables Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
Vipsi command syntax: Procedures
Data Types: Procedures
Glossary: Procedure
procedures
.

Flow control: if … then
Flow control: try … then
The
called Example Scripts: CGI Scripts
Example Scripts: Scripts
script
Flow control: end
Shell Immediate Commands: exit, quit, end
ends
when it executes an Flow control: end
Shell Immediate Commands: exit, quit, end
end
Vipsi command syntax: Instructions
Instructions
Glossary: Instruction
instruction
, Flow control: returnreturn on ground level (Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
not
inside a Vipsi command syntax: Procedures
Data Types: Procedures
Glossary: Procedure
procedure
) Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
program execution reaches Flow control: if … then
Flow control: try … then
the
Flow control: end
Shell Immediate Commands: exit, quit, end
end
of Flow control: if … then
Flow control: try … then
the
Example Scripts: CGI Scripts
Example Scripts: Scripts
script
Text functions: file
Instructions: file
file
. It also Flow control: end
Shell Immediate Commands: exit, quit, end
ends
when it encounters an uncatched error, which generates an error in Flow control: if … then
Flow control: try … then
the
calling Example Scripts: CGI Scripts
Example Scripts: Scripts
script
which subsequently will terminate Flow control: if … then
Flow control: try … then
the
calling Example Scripts: CGI Scripts
Example Scripts: Scripts
script
Flow control: if … thenif it Flow control: do … loopdoes Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
not
catch Flow control: if … then
Flow control: try … then
the
error.

Flow control: if … then
Flow control: try … then
The
called Example Scripts: CGI Scripts
Example Scripts: Scripts
script
is expected to Flow control: returnreturn a Glossary: Valuevalue with Flow control: end
Shell Immediate Commands: exit, quit, end
end
Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
Flow control: returnreturn. Flow control: if … thenIf it Flow control: do … loopdoes Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
not
Flow control: returnreturn a Glossary: Valuevalue, Flow control: if … then
Flow control: try … then
then
a result Glossary: Valuevalue of 0.0 is assumed.

There is also an Vipsi command syntax: Instructions
Instructions
Glossary: Instruction
instruction
Functions with varying return types: call
Instructions: call
call
which Flow control: do … loopdoes pretty Flow control: if … then
Flow control: try … then
the
same thing but Flow control: do … loopdoes Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
not
expect a Shell Scripts: Return values
Appendix: Return values
return value
.

e.g.:

Instructions: var
How does VScript::Value() work?: Var*&
var
rslt = Functions with varying return types: call
Instructions: call
call
( "utils/add2db.vs", user_id, number, Glossary: Valuevalue )

eval

<value> = Functions with varying return types: eval
Instructions: eval
eval
<text> <value> = Functions with varying return types: eval
Instructions: eval
eval
( <text> )

Execute <text> as a vip Example Scripts: CGI Scripts
Example Scripts: Scripts
script
Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
Flow control: returnreturn it's result Glossary: Valuevalue.

Flow control: if … then
Flow control: try … then
The
Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
is parsed just like a Example Scripts: CGI Scripts
Example Scripts: Scripts
script
, so almost every Vipsi command syntax: Expressions
Glossary: Expression
expression
is possible here, including execution of own Vipsi command syntax: Procedures
Data Types: Procedures
Glossary: Procedure
procedures
.

Flow control: if … then
Flow control: try … then
The
evaluated Vipsi command syntax: Expressions
Glossary: Expression
expression
Flow control: end
Shell Immediate Commands: exit, quit, end
ends
when it executes an Flow control: end
Shell Immediate Commands: exit, quit, end
end
Vipsi command syntax: Instructions
Instructions
Glossary: Instruction
instruction
, Flow control: returnreturn on ground level (Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
not
inside a Vipsi command syntax: Procedures
Data Types: Procedures
Glossary: Procedure
procedure
) Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
execution reaches Flow control: if … then
Flow control: try … then
the
Flow control: end
Shell Immediate Commands: exit, quit, end
end
of Flow control: if … then
Flow control: try … then
the
Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
. It also Flow control: end
Shell Immediate Commands: exit, quit, end
ends
when it encounters an uncatched error, which generates an error in Flow control: if … then
Flow control: try … then
the
calling Example Scripts: CGI Scripts
Example Scripts: Scripts
script
which subsequently will terminate Flow control: if … then
Flow control: try … then
the
calling Example Scripts: CGI Scripts
Example Scripts: Scripts
script
Flow control: if … thenif it Flow control: do … loopdoes Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
not
catch Flow control: if … then
Flow control: try … then
the
error.

Flow control: if … then
Flow control: if … then
If the
Example Scripts: CGI Scripts
Example Scripts: Scripts
script
Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
Flow control: do … loopdoes Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
not
Flow control: returnreturn a Glossary: Valuevalue, Flow control: if … then
Flow control: try … then
then
List functions: thisthis will probably generate an error when Flow control: if … then
Flow control: try … then
the
result is used as Vipsi command syntax: Arguments
Glossary: Arguments
argument
to an Vipsi command syntax: Instructions
Instructions
Glossary: Instruction
instruction
Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
Vipsi command syntax: Operators
Operators
Glossary: Operator
operator
=.

There is also an Vipsi command syntax: Instructions
Instructions
Glossary: Instruction
instruction
Functions with varying return types: eval
Instructions: eval
eval
which expects no result Glossary: Valuevalue.

vipsi> // stupid example
vipsi> Instructions: putput Functions with varying return types: eval
Instructions: eval
eval
«"hello!"»
hello!
Instructions: var
How does VScript::Value() work?: Var*&
var
Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
= "" Flow control: do … loopdo Instructions: putput Constants: nlnl, "eval> " Instructions: getget Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
Flow control: whilewhile Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
!="" Instructions: putput " = " Flow control: try … thentry Instructions: putput Functions with varying return types: eval
Instructions: eval
eval
Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
Flow control: if … then
Flow control: try … then
else
Instructions: putput #stderr, "bummer!" Flow control: if … then
Flow control: try … then
then
Flow control: do … looploop Instructions: putput Constants: nlnl, "bye bye!",Constants: nlnl

bracket expression "()"

<value> = ( <expression> )
<var_ref> = ( <expression> )

Enclose an Vipsi command syntax: Expressions
Glossary: Expression
expression
.

Shell Scripts: Return values
Appendix: Return values
Return value
is that of Flow control: if … then
Flow control: try … then
the
Vipsi command syntax: Expressions
Glossary: Expression
expression
.

Separators: Round brackets "( … )"
Functions with varying return types: bracket expression "()"
Parenthesis
are most frequently used to enclose Operators: Subtract "-"sub Vipsi command syntax: Expressions
Glossary: Expression
expressions
to override Operators: Operator precedenceoperator precedence.

e.g.:

vipsi> 1 * 2 + 3  = 5
vipsi> 1 * (2+3)  = 6
vipsi>  
Other usage

Separators: Round brackets "( … )"
Functions with varying return types: bracket expression "()"
Parenthesis
are also used Operators: Make Identifier "@"at Flow control: if … then
Flow control: try … then
the
place of an Vipsi command syntax: Operators
Operators
Glossary: Operator
operator
to Functions with varying return types: call
Instructions: call
call
a Vipsi command syntax: Functions
Functions
Glossary: Function
function
Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
Vipsi command syntax: Procedures
Data Types: Procedures
Glossary: Procedure
procedure
Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
in Vipsi command syntax: Instructions
Instructions
Glossary: Instruction
instruction
Instructions: procproc Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
Literals: Procedure literals
Procedures: Procedure literals
procedure literal
Instructions: procproc in a way similar to Flow control: if … then
Flow control: try … then
the
Vipsi command syntax: Procedures
Data Types: Procedures
Glossary: Procedure
procedure
Functions with varying return types: call
Instructions: call
call
Vipsi command syntax: Operators
Operators
Glossary: Operator
operator
.

include

<value> = Functions with varying return types: include
Instructions: include
include
<filename>

Load Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
execute named Example Scripts: CGI Scripts
Example Scripts: Scripts
script
Text functions: file
Instructions: file
file
just as Flow control: if … thenif it's contents were part of Flow control: if … then
Flow control: try … then
the
current source. Flow control: if … then
Flow control: try … then
The
<filename> must be a Glossary: text, text_valtext value.

Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
Note
: Flow control: if … then
Flow control: try … then
the
Text functions: file
Instructions: file
file
is included Operators: Make Identifier "@"at Flow control: if … then
Flow control: try … then
the
time when List functions: thisthis Vipsi command syntax: Instructions
Instructions
Glossary: Instruction
instruction
is executed, that means: maybe never, maybe repeatedly, Flow control: if … thenif it occurs in a Flow control: do … looploop. It is Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
not
included Operators: Make Identifier "@"at pre-compile time Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
in some kind of pre-processor as in C.

Flow control: if … then
Flow control: try … then
The
included Example Scripts: CGI Scripts
Example Scripts: Scripts
script
Flow control: end
Shell Immediate Commands: exit, quit, end
ends
when it executes an Flow control: end
Shell Immediate Commands: exit, quit, end
end
Vipsi command syntax: Instructions
Instructions
Glossary: Instruction
instruction
, Flow control: returnreturn on ground level (Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
not
inside a Vipsi command syntax: Procedures
Data Types: Procedures
Glossary: Procedure
procedure
) Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
program execution reaches Flow control: if … then
Flow control: try … then
the
Flow control: end
Shell Immediate Commands: exit, quit, end
end
of Flow control: if … then
Flow control: try … then
the
Example Scripts: CGI Scripts
Example Scripts: Scripts
script
Text functions: file
Instructions: file
file
. It also Flow control: end
Shell Immediate Commands: exit, quit, end
ends
when it encounters an uncatched error, which generates an error in Flow control: if … then
Flow control: try … then
the
calling Example Scripts: CGI Scripts
Example Scripts: Scripts
script
which subsequently will terminate Flow control: if … then
Flow control: try … then
the
calling Example Scripts: CGI Scripts
Example Scripts: Scripts
script
Flow control: if … thenif it Flow control: do … loopdoes Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
not
catch Flow control: if … then
Flow control: try … then
the
error.

Flow control: if … then
Flow control: try … then
The
included Example Scripts: CGI Scripts
Example Scripts: Scripts
script
is expected to Flow control: returnreturn a Glossary: Valuevalue with Flow control: end
Shell Immediate Commands: exit, quit, end
end
Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
Flow control: returnreturn. Flow control: if … thenIf it Flow control: do … loopdoes Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
not
Flow control: returnreturn a Glossary: Valuevalue, Flow control: if … then
Flow control: try … then
then
a result Glossary: Valuevalue of 0.0 is assumed.

There is also an Vipsi command syntax: Instructions
Instructions
Glossary: Instruction
instruction
Functions with varying return types: include
Instructions: include
include
which Flow control: do … loopdoes pretty Flow control: if … then
Flow control: try … then
the
same thing but Flow control: do … loopdoes Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
not
expect a Shell Scripts: Return values
Appendix: Return values
return value
.

ioctl

<value> = Functions with varying return types: ioctl
Instructions: ioctl
ioctl
<name> <value> = Functions with varying return types: ioctl
Instructions: ioctl
ioctl
#<number>, <identifier>

Querry stream state

••• still under development •••

There is also an Vipsi command syntax: Instructions
Instructions
Glossary: Instruction
instruction
Functions with varying return types: ioctl
Instructions: ioctl
ioctl
which sets stream settings.

Set only:
    Functions with varying return types: ioctl
Instructions: ioctl
ioctl
flush|flushin|flushout
Set/read:
    Functions with varying return types: ioctl
Instructions: ioctl
ioctl
timeout = 0 (off) Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
Glossary: number, num_valnumber (seconds) Functions with varying return types: ioctl
Instructions: ioctl
ioctl
Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
= "utf-8" Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
"mac-roman" Functions with varying return types: ioctl
Instructions: ioctl
ioctl
pos = Glossary: number, num_valnumber (Text functions: file
Instructions: file
file
: read-write-pointer) {row,col} (tty: cursor location)
Read only:
    Functions with varying return types: ioctl
Instructions: ioctl
ioctl
Instructions: var
How does VScript::Value() work?: Var*&
var
= type ("tty", "Text functions: file
Instructions: file
file
", etc.) Functions with varying return types: ioctl
Instructions: ioctl
ioctl
Instructions: var
How does VScript::Value() work?: Var*&
var
= inavail (bytes readable w/o blocking) Functions with varying return types: ioctl
Instructions: ioctl
ioctl
Instructions: var
How does VScript::Value() work?: Var*&
var
= outfree (bytes writable w/o blocking) Functions with varying return types: ioctl
Instructions: ioctl
ioctl
Instructions: var
How does VScript::Value() work?: Var*&
var
= error (0=ok, 1=eof, 2=timeout, ...) Functions with varying return types: ioctl
Instructions: ioctl
ioctl
Instructions: var
How does VScript::Value() work?: Var*&
var
= size (Text functions: file
Instructions: file
file
: Glossary: number, num_valnumber, tty: {rows,cols}) Functions with varying return types: ioctl
Instructions: ioctl
ioctl
Instructions: var
How does VScript::Value() work?: Var*&
var
= Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
(filename) Functions with varying return types: ioctl
Instructions: ioctl
ioctl
Instructions: var
How does VScript::Value() work?: Var*&
var
= isopen/isopenin/isopenout

Valid HTML   Valid CSS