vipsi - the friendly vip script interpreter

Functions

Numeric functions

exists

<number> = Numeric functions: existsexists <variable>
<number> = Numeric functions: existsexists Text functions: file
Instructions: file
file
<path> <number> = Numeric functions: existsexists List functions: dir
Instructions: dir
Shell Immediate Commands: dir
dir
<path> <number> = Numeric functions: existsexists Text functions: link
Instructions: link
link
<path>

Test whether a Glossary: Variable, var_refvariable, Text functions: file
Instructions: file
file
, List functions: dir
Instructions: dir
Shell Immediate Commands: dir
dir
Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
Text functions: link
Instructions: link
link
Numeric functions: existsexists.

Flow control: returnReturns a numeric Glossary: Valuevalue, which is either 1 (true) Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
0 (false).

When testing for a Glossary: Variable, var_refvariable, Flow control: if … then
Flow control: try … then
the
Glossary: Variable, var_refvariable path may be completely broken, as long as Flow control: if … then
Flow control: try … then
the
overall syntax of Flow control: if … then
Flow control: try … then
the
Glossary: Variable, var_refvariable Vipsi command syntax: Expressions
Glossary: Expression
expression
is ok. Flow control: if … then
Flow control: try … then
The
result will probably be 'false' Flow control: if … then
Flow control: try … then
then
.

When testing for Text functions: file
Instructions: file
files
, directories Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
Text functions: link
Instructions: link
links
, Flow control: if … then
Flow control: try … then
the
path must be a Glossary: text, text_valtext value Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
may be a full Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
partial path Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
start with "~" for Flow control: if … then
Flow control: try … then
the
user's home directory. Symbolic Text functions: link
Instructions: link
links
are followed, except Flow control: if … then
Flow control: try … then
the
last path component which is Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
not
followed when testing for a Text functions: link
Instructions: link
link
. Flow control: if … then
Flow control: try … then
The
path may be entirely broken, Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
not
even Flow control: if … then
Flow control: try … then
the
first path component is required to Numeric functions: existsexist. Flow control: if … then
Flow control: try … then
The
result will probably be 'false' Flow control: if … then
Flow control: try … then
then
.

Shell Scripts: Return values
Appendix: Return values
Return values
of Numeric functions: existsexists Text functions: file
Instructions: file
file
:

Shell Scripts: Return values
Appendix: Return values
Return values
of Numeric functions: existsexists List functions: dir
Instructions: dir
Shell Immediate Commands: dir
dir
:

Shell Scripts: Return values
Appendix: Return values
Return values
of Numeric functions: existsexists Text functions: link
Instructions: link
link
:

*) as of version 0.8.7. Will probably be changed, so that Numeric functions: existsexists Flow control: returnreturns 'true' whever Operators: Make Identifier "@"at Flow control: if … then
Flow control: try … then
the
target position is already an item, which prevents Instructions: newnew from succeeding. After a 'true' result you can test with Numeric functions: isfileisfile, Numeric functions: isdirisdir Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
Numeric functions: islinkislink for Flow control: if … then
Flow control: try … then
the
actual Text functions: file
Instructions: file
file
type.

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> Instructions: var
How does VScript::Value() work?: Var*&
var
a={1,2,3};
vipsi> Numeric functions: existsexists a[3] = 1 vipsi> Numeric functions: existsexists(a[5]) = 0 vipsi> Numeric functions: existsexists List functions: dir
Instructions: dir
Shell Immediate Commands: dir
dir
"/"
1 vipsi> Numeric functions: existsexists Text functions: file
Instructions: file
file
"/etc/fstab"
1 vipsi> Numeric functions: existsexists Text functions: link
Instructions: link
link
"~/foobär"
0 vipsi> Text functions: link
Instructions: link
link
"zz" = "/"
vipsi> Numeric functions: existsexists Text functions: link
Instructions: link
link
"zz"
1 vipsi> Numeric functions: existsexists Text functions: link
Instructions: link
link
Text functions: fullpathfullpath "zz"
0 vipsi> Numeric functions: existsexists List functions: dir
Instructions: dir
Shell Immediate Commands: dir
dir
Text functions: fullpathfullpath "zz"
1 vipsi>

Valid HTML   Valid CSS