vipsi - the friendly vip script interpreter

Functions

List functions

Vipsi command syntax: Functions
Functions
Glossary: Function
Functions
which Flow control: returnreturn Data Types: Lists and arrays
Item selector "[]": Lists
Glossary: list, list_val
lists
.

dir

<list> = List functions: dir
Instructions: dir
Shell Immediate Commands: dir
dir
( <text> ) <list> = List functions: dir
Instructions: dir
Shell Immediate Commands: dir
dir
<text>

Flow control: returnReturns Flow control: if … then
Flow control: try … then
the
contents of directory with path <text>. Flow control: if … then
Flow control: try … then
The
path 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 List functions: env
Shell Immediate Commands: env
Shell Immediate Commands: env
env
.HOME Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
may contain a Numeric functions: matchmatch pattern with Operators: Multiply "*"wildcards for Text functions: file
Instructions: file
files
to Data Types: Lists and arrays
Item selector "[]": Lists
Glossary: list, list_val
list
in Flow control: if … then
Flow control: try … then
the
last path component.

There are also a Shell Immediate Commands
Invariants: Shell immediate commands
shell immediate command
List functions: dir
Instructions: dir
Shell Immediate Commands: dir
dir
, which prints a beautified directory Online Chat: Listings
Search Site: Listing
Print Environment: Listing
Online Z80 Assembler: Listing
Show Beautified Folder Listings: Listing
Sort-of-a Shell: Listing
Factorial "!": Listing
Prime Factor Factorizing: Listing
Speedometer: Listing
VIP Script Test Suite: Listing
listing
Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
an Vipsi command syntax: Instructions
Instructions
Glossary: Instruction
instruction
List functions: dir
Instructions: dir
Shell Immediate Commands: dir
dir
, which creates a directory.

Flow control: if … then
Flow control: try … then
The
Shell Scripts: Return values
Appendix: Return values
return value
is a Data Types: Lists and arrays
Item selector "[]": Lists
Glossary: list, list_val
list
with one item per directory entry. These items itself again are Data Types: Lists and arrays
Item selector "[]": Lists
Glossary: list, list_val
lists
with named items. Flow control: if … then
Flow control: try … then
The
layout of each item is as follows:

myDirList[1] =
{
    dir: fnamefname = "foo.bar",
    dir: flagsflags = "-rwx",
    dir: lengthlength= "123",
    mtime = 1086893549,
    atime = 1086893549,
    ctime = 1086893549
}
fname

List functions: thisthis is Flow control: if … then
Flow control: try … then
the
Text functions: file
Instructions: file
file
's Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
, as stored in Flow control: if … then
Flow control: try … then
the
Text functions: file
Instructions: file
file
system. Flow control: if … then
Flow control: if … then
If the
item is a directory Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
a symbolic Text functions: link
Instructions: link
link
which refers to a directory, Flow control: if … then
Flow control: try … then
then
a slash "/" is appended to Flow control: if … then
Flow control: try … then
the
filename.

flags

List functions: thisThis is a 4-letter Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
which shows Instructions: readread, Instructions: writewrite Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
execute permissions. Flow control: if … thenIf one permission is granted, Flow control: if … then
Flow control: try … then
the
corresponding letter is written Operators: Make Identifier "@"at it's place, Flow control: if … then
Flow control: try … then
else
a dash "-".
Flow control: if … then
Flow control: try … then
The
first character indicates a symbolic Text functions: link
Instructions: link
link
with letter "l".

length

dir: lengthLength is in bytes for Text functions: file
Instructions: file
files
Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
Glossary: number, num_valnumber of entries for directories. Symbolic Text functions: link
Instructions: link
links
are dereferenced prior Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
Flow control: if … thenif they are broken Flow control: if … then
Flow control: try … then
then
dir: lengthlength is 0.

mtime, atime and ctime

These are Flow control: if … then
Flow control: try … then
the
last modification time, the last access time Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
Flow control: if … then
Flow control: try … then
the
last meta data update time, like renaming Flow control: if … then
Flow control: try … then
the
Text functions: file
Instructions: file
file
. Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
Not
all Text functions: file
Instructions: file
file
system support all time stamps. Flow control: if … then
Flow control: try … then
The
time is given in Unix standard time in seconds since 1970 Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
may be converted to a readable Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
with Vipsi command syntax: Functions
Functions
Glossary: Function
function
Text functions: datestrdatestr().

env

<list> = List functions: env
Shell Immediate Commands: env
Shell Immediate Commands: env
env

Flow control: returnReturns a Data Types: Lists and arrays
Item selector "[]": Lists
Glossary: list, list_val
list
with all environment Glossary: Variable, var_refvariables. Each item in List functions: thisthis Data Types: Lists and arrays
Item selector "[]": Lists
Glossary: list, list_val
list
is named after Flow control: if … then
Flow control: try … then
the
environment Glossary: Variable, var_refvariable's Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
Flow control: if … then
Flow control: try … then
the
Glossary: text, text_valtext value contains Flow control: if … then
Flow control: try … then
the
environment Glossary: Variable, var_refvariable's data. Environment Glossary: Variable, var_refvariables are always Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
.

There is also a Shell Immediate Commands
Invariants: Shell immediate commands
shell immediate command
List functions: env
Shell Immediate Commands: env
Shell Immediate Commands: env
env
which prints a beautified Online Chat: Listings
Search Site: Listing
Print Environment: Listing
Online Z80 Assembler: Listing
Show Beautified Folder Listings: Listing
Sort-of-a Shell: Listing
Factorial "!": Listing
Prime Factor Factorizing: Listing
Speedometer: Listing
VIP Script Test Suite: Listing
listing
of Flow control: if … then
Flow control: try … then
the
environment Glossary: Variable, var_refvariables, similar to Flow control: if … then
Flow control: try … then
the
Online Chat: Listings
Search Site: Listing
Print Environment: Listing
Online Z80 Assembler: Listing
Show Beautified Folder Listings: Listing
Sort-of-a Shell: Listing
Factorial "!": Listing
Prime Factor Factorizing: Listing
Speedometer: Listing
VIP Script Test Suite: Listing
listing
generated by Flow control: if … then
Flow control: try … then
the
Flow control: if … then
Flow control: try … then
the
following Example Scriptsexample script:

Instructions: var
How does VScript::Value() work?: Var*&
var
List functions: env
Shell Immediate Commands: env
Shell Immediate Commands: env
env
Instructions: var
How does VScript::Value() work?: Var*&
var
i=0 Flow control: do … loopdo Flow control: whilewhile ++i <= Numeric functions: countcount List functions: env
Shell Immediate Commands: env
Shell Immediate Commands: env
env
Instructions: var
How does VScript::Value() work?: Var*&
var
Data = List functions: env
Shell Immediate Commands: env
Shell Immediate Commands: env
env
[i] Text functions: convert
Instructions: convert
convert
Data from utf8 // rarely really required Text functions: convert
Instructions: convert
convert
Data to quoted // quote Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
escape Glossary: text_ref, text_vartext var Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
Name
= Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
List functions: env
Shell Immediate Commands: env
Shell Immediate Commands: env
env
[i] Instructions: putput Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
Name
, Text functions: spacestrspacestr(20)[Numeric functions: countcount Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
Name
to], " = ", Data[to 50], Constants: nlnl Flow control: do … looploop

globals

<list_ref> = List functions: globals
Shell Immediate Commands: globals
globals

Flow control: returnReturn a reference to Flow control: if … then
Flow control: try … then
the
List functions: globals
Shell Immediate Commands: globals
globals
Glossary: Variable, var_refvariables Data Types: Lists and arrays
Item selector "[]": Lists
Glossary: list, list_val
list
.

List functions: thisThis is useful Flow control: if … thenif you want to Operators: Add to Variable "+="
Operators: Add "+"
add
Instructions: newnew List functions: globals
Shell Immediate Commands: globals
global
Glossary: Variable, var_refvariables from within 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
Flow control: if … thenif you explicitly want to refer to a certain List functions: globals
Shell Immediate Commands: globals
global
Glossary: Variable, var_refvariable. Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
Or
you may save all List functions: globals
Shell Immediate Commands: globals
global
data to Text functions: file
Instructions: file
file
in one go.

Flow control: if … thenIf executed on 'ground level', that is, outside any Vipsi command syntax: Procedures
Data Types: Procedures
Glossary: Procedure
procedure
, Flow control: if … then
Flow control: try … then
then
List functions: localslocals Flow control: returnreturns a reference to Flow control: if … then
Flow control: try … then
the
List functions: globals
Shell Immediate Commands: globals
globals
Data Types: Lists and arrays
Item selector "[]": Lists
Glossary: list, list_val
list
Glossary: Variable, var_refvariable.

e.g.:

Instructions: putput List functions: globals
Shell Immediate Commands: globals
globals
Instructions: procproc Test_A () { Flow control: if … thenif !Numeric functions: existsexists List functions: globals
Shell Immediate Commands: globals
globals
.a Instructions: newnew Instructions: var
How does VScript::Value() work?: Var*&
var
List functions: globals
Shell Immediate Commands: globals
globals
.a Flow control: if … then
Flow control: try … then
then
} Text functions: file
Instructions: file
file
"safefile" = List functions: globals
Shell Immediate Commands: globals
globals
List functions: globals
Shell Immediate Commands: globals
globals
##= Text functions: file
Instructions: file
file
safefile

Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
Note
: Flow control: whilewhile you can save all List functions: globals
Shell Immediate Commands: globals
globals
easily, you must use a little trick to load Flow control: if … then
Flow control: try … then
them
back, because you cannot Text functions: replace
Instructions: replace
replace
Flow control: if … then
Flow control: try … then
the
Data Types: Lists and arrays
Item selector "[]": Lists
Glossary: list, list_val
list
Glossary: Variable, var_refvariable List functions: globals
Shell Immediate Commands: globals
globals
with Instructions: newnew contents: Just Operators: Append Text to Variable "#="
Operators: Append List to Variable "##="
Operators: Concatenate Texts "#"
Operators: Concatenate Lists "##"
concatenate
Flow control: if … then
Flow control: try … then
the
old Data Types: Lists and arrays
Item selector "[]": Lists
Glossary: list, list_val
list
to Flow control: if … then
Flow control: try … then
the
current one. List functions: thisThis is more a 'merge' than a 'load' though.

There is also a Shell Immediate Commands
Invariants: Shell immediate commands
shell immediate command
List functions: globals
Shell Immediate Commands: globals
globals
, which prints a beautified Data Types: Lists and arrays
Item selector "[]": Lists
Glossary: list, list_val
list
of all List functions: globals
Shell Immediate Commands: globals
global
Glossary: Variable, var_refvariables.

Because of List functions: thisthis you cannot simply type List functions: globals
Shell Immediate Commands: globals
globals
in Flow control: if … then
Flow control: try … then
the
vipsi shell Flow control: if … thenif you want to see Flow control: if … then
Flow control: try … then
the
Data Types: Lists and arrays
Item selector "[]": Lists
Glossary: list, list_val
list
of List functions: globals
Shell Immediate Commands: globals
globals
Glossary: Variable, var_refvariable, you would execute Flow control: if … then
Flow control: try … then
the
shell command instead, though List functions: thisthis is probably what you actually want most times. In order to execute Flow control: if … then
Flow control: try … then
the
Vipsi command syntax: Functions
Functions
Glossary: Function
function
List functions: globals
Shell Immediate Commands: globals
globals
you must 'hide' Flow control: if … then
Flow control: try … then
the
List functions: words
Shell Immediate Commands: words
word
somehow from Flow control: if … then
Flow control: try … then
the
shell, which is simply done by Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
not
starting in column 1. Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
Or
you use Instructions: putput as you would in any Example Scripts: CGI Scripts
Example Scripts: Scripts
script
:

vipsi> Instructions: putput List functions: globals
Shell Immediate Commands: globals
globals
vipsi> List functions: globals
Shell Immediate Commands: globals
globals
vipsi> ;List functions: globals
Shell Immediate Commands: globals
globals

List functions: globals
Shell Immediate Commands: globals
globals
is actually also Flow control: if … then
Flow control: try … then
the
real Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
of Flow control: if … then
Flow control: try … then
the
List functions: globals
Shell Immediate Commands: globals
global
Glossary: Variable, var_refvariables Data Types: Lists and arrays
Item selector "[]": Lists
Glossary: list, list_val
list
. You can Instructions: renamerename it, but you can always access it with List functions: globals
Shell Immediate Commands: globals
globals
.

join

<text> = List functions: join
Instructions: join
join
( <list_var>, <separator> )

Insert Flow control: if … then
Flow control: try … then
the
Separatorsseparator between all Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
texts
Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
Operators: Append Text to Variable "#="
Operators: Append List to Variable "##="
Operators: Concatenate Texts "#"
Operators: Concatenate Lists "##"
concatenate
all Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
texts
from Flow control: if … then
Flow control: try … then
the
Data Types: Lists and arrays
Item selector "[]": Lists
Glossary: list, list_val
list
Glossary: Variable, var_refvariable to one Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
. Any item which is Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
not
a Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
is converted Text functions: stringto text prior.

There is also an Vipsi command syntax: Instructions
Instructions
Glossary: Instruction
instruction
List functions: join
Instructions: join
join
which stores back Flow control: if … then
Flow control: try … then
the
joined Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
into Flow control: if … then
Flow control: try … then
the
original Glossary: Variable, var_refvariable.

Instructions: var
How does VScript::Value() work?: Var*&
var
mytext = Text functions: file
Instructions: file
file
"foobär" mytext = List functions: split
Instructions: split
split
(mytext) // into lines mytext = List functions: join
Instructions: join
join
(mytext,Constants: nlnl) // rejoin Flow control: if … then
Flow control: try … then
them
, inserting unix Constants: nlnl's

locals

<list_ref> = List functions: localslocals

Flow control: returnReturn a reference to Flow control: if … then
Flow control: try … then
the
List functions: localslocal Glossary: Variable, var_refvariables Data Types: Lists and arrays
Item selector "[]": Lists
Glossary: list, list_val
list
.

List functions: thisThis is useful Flow control: if … thenif you want to access unnamed Vipsi command syntax: Arguments
Glossary: Arguments
arguments
in a Vipsi command syntax: Procedures
Data Types: Procedures
Glossary: Procedure
procedure
with a Glossary: Variable, var_refvariable Vipsi command syntax: Arguments
Glossary: Arguments
argument
Data Types: Lists and arrays
Item selector "[]": Lists
Glossary: list, list_val
list
.

e.g.:

Instructions: putput List functions: localslocals

Instructions: procproc Test_A ( * )
{
    Instructions: var
How does VScript::Value() work?: Var*&
var
acnt = Numeric functions: countcount List functions: localslocals -1; Instructions: renamerename List functions: localslocals[1] = style; /* ... */ }

List functions: localslocals is actually also Flow control: if … then
Flow control: try … then
the
real Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
of Flow control: if … then
Flow control: try … then
the
List functions: localslocal Glossary: Variable, var_refvariables Data Types: Lists and arrays
Item selector "[]": Lists
Glossary: list, list_val
list
. You can Instructions: renamerename it, but you can always access it with List functions: localslocals.

split

<list> = List functions: split
Instructions: split
split
( <text> ) <list> = List functions: split
Instructions: split
split
( <text> ,<separator> ) <list> = List functions: split
Instructions: split
split
( <list> ) <list> = List functions: split
Instructions: split
split
( <list> ,<separator> )

List functions: split
Instructions: split
Split
Flow control: if … then
Flow control: try … then
the
Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
Operators: Make Identifier "@"at Flow control: if … then
Flow control: try … then
the
given Separatorsseparator Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
Flow control: returnreturn Flow control: if … then
Flow control: try … then
the
resulting Data Types: Lists and arrays
Item selector "[]": Lists
Glossary: list, list_val
list
of Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
chunks. Flow control: if … then
Flow control: try … then
The
Separatorsseparator 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 single character Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
any longer Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
. It is removed Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
not
preserved when splitting a line.

Flow control: if … thenIf no Separatorsseparator is given, Flow control: if … then
Flow control: try … then
then
Flow control: if … then
Flow control: try … then
the
Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
is List functions: split
Instructions: split
split
Operators: Make Identifier "@"at any character which looks like a line break: char(0), char(10), char(13) Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
char(10)+char(13).

Flow control: if … thenIf List functions: split
Instructions: split
split
is passed a Data Types: Lists and arrays
Item selector "[]": Lists
Glossary: list, list_val
list
instead of a Glossary: text, text_valtext value, Flow control: if … then
Flow control: try … then
then
it works on all Data Types: Lists and arrays
Item selector "[]": Lists
Glossary: list, list_val
list
items. Recursively.

There is also an Vipsi command syntax: Instructions
Instructions
Glossary: Instruction
instruction
List functions: split
Instructions: split
split
which stores back Flow control: if … then
Flow control: try … then
the
Data Types: Lists and arrays
Item selector "[]": Lists
Glossary: list, list_val
list
in Flow control: if … then
Flow control: try … then
the
original Glossary: Variable, var_refvariable.

Instructions: var
How does VScript::Value() work?: Var*&
var
mytext = Text functions: file
Instructions: file
file
"foobär" mytext = List functions: split
Instructions: split
split
mytext // into lines mytext = List functions: split
Instructions: split
split
mytext, Constants: tabtab // each line Operators: Make Identifier "@"at Constants: tabtabs

this

<list_ref> = List functions: thisthis

Flow control: returnReturn a reference to Flow control: if … then
Flow control: try … then
the
Data Types: Lists and arrays
Item selector "[]": Lists
Glossary: list, list_val
list
Glossary: Variable, var_refvariable which contains Flow control: if … then
Flow control: try … then
the
current Vipsi command syntax: Procedures
Data Types: Procedures
Glossary: Procedure
procedure
.

List functions: thisThis Vipsi command syntax: Functions
Functions
Glossary: Function
function
must only be executed inside Vipsi command syntax: Procedures
Data Types: Procedures
Glossary: Procedure
procedures
. It Flow control: returnreturns a reference to Flow control: if … then
Flow control: try … then
the
Data Types: Lists and arrays
Item selector "[]": Lists
Glossary: list, list_val
list
which contains Flow control: if … then
Flow control: try … then
the
Vipsi command syntax: Procedures
Data Types: Procedures
Glossary: Procedure
procedure
.

Normally a Glossary: Variable, var_refvariable is searched in Flow control: if … then
Flow control: try … then
the
current privates context, walking up to Flow control: if … then
Flow control: try … then
the
topmost List functions: localslocals Data Types: Lists and arrays
Item selector "[]": Lists
Glossary: list, list_val
list
of Flow control: if … then
Flow control: try … then
the
Vipsi command syntax: Procedures
Data Types: Procedures
Glossary: Procedure
procedure
. Flow control: if … then
Flow control: try … then
Then
Flow control: if … then
Flow control: try … then
the
enclosing Data Types: Lists and arrays
Item selector "[]": Lists
Glossary: list, list_val
list
, which contains Flow control: if … then
Flow control: try … then
the
Vipsi command syntax: Procedures
Data Types: Procedures
Glossary: Procedure
procedure
, is scanned. Operators: Make Identifier "@"At last Flow control: if … then
Flow control: try … then
the
interpreter searches Flow control: if … then
Flow control: try … then
the
List functions: globals
Shell Immediate Commands: globals
globals
Data Types: Lists and arrays
Item selector "[]": Lists
Glossary: list, list_val
list
.

So normally it is Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
not
neccessary to use List functions: thisthis to access a 'neighbour' Glossary: Variable, var_refvariable.

What is it good for anyway?

Flow control: if … then
Flow control: try … then
The
Vipsi command syntax: Procedures
Data Types: Procedures
Glossary: Procedure
procedure
might be locally defined inside another Vipsi command syntax: Procedures
Data Types: Procedures
Glossary: Procedure
procedure
. Flow control: if … then
Flow control: try … then
Then
it can easily access all List functions: localslocal Glossary: Variable, var_refvariables of List functions: thisthis Vipsi command syntax: Procedures
Data Types: Procedures
Glossary: Procedure
procedure
too.

Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
Or
you Instructions: putput Vipsi command syntax: Procedures
Data Types: Procedures
Glossary: Procedure
procedures
into complicated Data Types: Lists and arrays
Item selector "[]": Lists
Glossary: list, list_val
lists
to manage some aspects, offering a light-weight approach to object oriented programming.

e.g.:

Instructions: procproc Instructions: swapSwap(Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
,Text1,Text2) { Instructions: procproc Text functions: replace
Instructions: replace
Replace
(Oldtext,NewText) { Text functions: replace
Instructions: replace
replace
Data Types: Text
Item selector "[]": Text
Glossary: text, text_val
text
,OldText,NewText } Instructions: var
How does VScript::Value() work?: Var*&
var
z = ")(/&/%&%$§&%" Text functions: replace
Instructions: replace
Replace
( Text1, z ) Text functions: replace
Instructions: replace
Replace
( Text2,Text1 ) Text functions: replace
Instructions: replace
Replace
( z, Text2 ) }
Instructions: var
How does VScript::Value() work?: Var*&
var
Spin = { Again = 0, Delay = 0.1, Numeric functions: indexIndex = 1, Numeric functions: countCount = 0, Reset() { Numeric functions: countCount=0 }, Wheel() { Flow control: if … thenif now>=Again Again = Numeric functions: nownow + Delay Numeric functions: indexIndex %= 4 Numeric functions: indexIndex += 1 Instructions: putput "|/-\\"[Numeric functions: indexIndex],"\b" Flow control: if … then
Flow control: try … then
then
Flow control: returnreturn ++Numeric functions: countCount } }

words

<list> = List functions: words
Shell Immediate Commands: words
words

Flow control: returnReturn a Data Types: Lists and arrays
Item selector "[]": Lists
Glossary: list, list_val
list
of all built-in List functions: words
Shell Immediate Commands: words
words
. List functions: thisThis Data Types: Lists and arrays
Item selector "[]": Lists
Glossary: list, list_val
list
contains all tokens, including those only used internally, Operators: Boolean And with Variable "&&="
Operators: Bitwise And with Variable "&="
Operators: Bitwise And "&"
Operators: Boolean And "&&"
and
with no direct visual Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
. These are ccalled 'tNUM' Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
'tEOF' Operators: Boolean Or with Variable "||="
Operators: Bitwise Or with Variable "|="
Operators: Bitwise Or "|"
Operators: Boolean Or "||"
or
Flow control: if … then
Flow control: try … then
the
like.

List functions: thisThis is Flow control: if … then
Flow control: try … then
the
Data Types: Lists and arrays
Item selector "[]": Lists
Glossary: list, list_val
list
which i currently (version 0.8.8pre) Instructions: getget from Vipsi command syntax: Functions
Functions
Glossary: Function
function
List functions: words
Shell Immediate Commands: words
words
:

{ "tNUM", "0", "1", "tSHORT", "tBYTE", "tSTR", "tSTR2", "tIDF", ",", "(", ")", "[", "]", "{", "}", "++", "--", "=", "+=", "-=", "*=", "/=", "%=", "#=", ">>=", "<<=", "&&=", "||=", "^=", "&=", "|=", "##=", "+", "-", "*", "/", "%", "#", "##", ">", "<", ">=", "<=", "==", "!=", "<<", ">>", "&&", "||", "&", "|", "^", ".", "?", ":", "from", "to", "Constants: ecec", "Constants: pipi", "Constants: nlnl", "Constants: tabtab", "Constants: stdinstdin", "Constants: stdoutstdout", "Constants: stderrstderr", "!", "~", "@", "Text functions: file
Instructions: file
file
", "List functions: dir
Instructions: dir
Shell Immediate Commands: dir
dir
", "Text functions: link
Instructions: link
link
", "pipe", "sock", "Numeric functions: mdatemdate", "Numeric functions: countcount", "Numeric functions: indexindex", "Vipsi command syntax: Identifiers (names)
Identifiers, names
Operators: Make Identifier "@"
Text functions: name
Glossary: Name, Identifier
name
", "Numeric functions: randomrandom", "Numeric functions: absabs", "Numeric functions: signsign", "Numeric functions: intint", "Numeric functions: fractfract", "Numeric functions: roundround", "Numeric functions: minmin", "Numeric functions: maxmax", "Numeric functions: coscos", "Numeric functions: sinsin", "Numeric functions: tantan", "Numeric functions: acosacos", "Numeric functions: asinasin", "Numeric functions: atanatan", "Numeric functions: coshcosh", "Numeric functions: sinhsinh", "Numeric functions: tanhtanh", "logn", "Numeric functions: log2log2", "Numeric functions: log
Numeric functions: loge
Instructions: log
loge
", "Numeric functions: log10log10", "Numeric functions: exp
Numeric functions: expe
exp
", "Numeric functions: exp2exp2", "Numeric functions: exp
Numeric functions: expe
expe
", "Numeric functions: exp10exp10", "Numeric functions: squaresquare", "Numeric functions: sqrtsqrt", "Numeric functions: istextistext", "Numeric functions: isnumberisnumber", "Numeric functions: islistislist", "Numeric functions: isprocisproc", "Numeric functions: isfileisfile", "Numeric functions: isdirisdir", "Numeric functions: islinkislink", "Numeric functions: existsexists", "Data Types: Text
Text functions: string
string
", "Text functions: upperstrupperstr", "Text functions: lowerstrlowerstr", "Text functions: spacestrspacestr", "Text functions: charstrcharstr", "Numeric functions: charcodecharcode", "Text functions: hexstrhexstr", "Text functions: binstrbinstr", "Text functions: substrsubstr", "Text functions: midstrmidstr", "Text functions: leftstrleftstr", "Text functions: rightstrrightstr", "Text functions: datestrdatestr", "Numeric functions: nownow", "Numeric functions: datevaldateval", "Numeric functions: findfind", "Numeric functions: rfindrfind", "List functions: env
Shell Immediate Commands: env
Shell Immediate Commands: env
env
", "List functions: words
Shell Immediate Commands: words
words
", "Text functions: info
Shell Immediate Commands: info
info
", "List functions: globals
Shell Immediate Commands: globals
globals
", "List functions: localslocals", "List functions: thisthis", "Numeric functions: matchmatch", "Text functions: fullpathfullpath", "Functions with varying return types: eval
Instructions: eval
eval
", "Functions with varying return types: call
Instructions: call
call
", "Text functions: sys
Instructions: sys
sys
", "Functions with varying return types: include
Instructions: include
include
", "Instructions: requirerequire", "List functions: split
Instructions: split
split
", "Text functions: convert
Instructions: convert
convert
", "Text functions: replace
Instructions: replace
replace
", "Instructions: newnew", "Instructions: deldel", "Instructions: swapswap", "Instructions: var
How does VScript::Value() work?: Var*&
var
", "Instructions: freezefreeze", "Instructions: meltmelt", "Instructions: putput", "Numeric functions: log
Numeric functions: loge
Instructions: log
log
", "Instructions: getget", "Instructions: editedit", "Instructions: getchargetchar", "Instructions: writewrite", "Instructions: readread", "Functions with varying return types: ioctl
Instructions: ioctl
ioctl
", "Instructions: waitwait", "Instructions: sortsort", "Instructions: rsortrsort", "Instructions: openopen", "Instructions: openinopenin", "Instructions: openoutopenout", "Instructions: closeclose", "Instructions: renamerename", ";", "Instructions: cd
Shell Immediate Commands: cd
cd
", "Instructions: procproc", "Flow control: returnreturn", "Flow control: end
Shell Immediate Commands: exit, quit, end
end
", "Flow control: do … loopdo", "Flow control: if … then
Flow control: try … then
then
", "Flow control: if … thenif", "Flow control: if … then
Flow control: try … then
else
", "Flow control: if … thenelif", "Flow control: try … thentry", "Flow control: whilewhile", "Flow control: untiluntil", "Flow control: exit
Shell Immediate Commands: exit, quit, end
exit
", "Flow control: nextnext", "Flow control: do … looploop", "tEOF", "//", "/*", "*/", "Shell Immediate Commands: pwdpwd" }

There is also a Shell Immediate Commands
Invariants: Shell immediate commands
shell immediate command
List functions: words
Shell Immediate Commands: words
words
, which prints a beautified Online Chat: Listings
Search Site: Listing
Print Environment: Listing
Online Z80 Assembler: Listing
Show Beautified Folder Listings: Listing
Sort-of-a Shell: Listing
Factorial "!": Listing
Prime Factor Factorizing: Listing
Speedometer: Listing
VIP Script Test Suite: Listing
listing
of all built-in List functions: words
Shell Immediate Commands: words
words
, omitting those with no real visual representation. Flow control: if … thenIf you type List functions: words
Shell Immediate Commands: words
words
in Flow control: if … then
Flow control: try … then
the
vipsi shell you most likely execute List functions: thisthis command. You must prevent Flow control: if … then
Flow control: try … then
the
vipsi shell from recognizing List functions: words
Shell Immediate Commands: words
words
:

vipsi> List functions: words
Shell Immediate Commands: words
words
// invokes Flow control: if … then
Flow control: try … then
the
Shell Immediate Commands
Invariants: Shell immediate commands
shell immediate command
vipsi> Instructions: putput List functions: words
Shell Immediate Commands: words
words
// print Flow control: if … then
Flow control: try … then
the
Data Types: Lists and arrays
Item selector "[]": Lists
Glossary: list, list_val
list
of Vipsi command syntax: Functions
Functions
Glossary: Function
function
'List functions: words
Shell Immediate Commands: words
words
'
vipsi> ;List functions: words
Shell Immediate Commands: words
words
// dito. Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
note
Flow control: if … then
Flow control: try … then
the
";"
vipsi> List functions: words
Shell Immediate Commands: words
words
// dito. Operators: Bitwise Not "~"
Operators: Boolean Negation "!"
note
Flow control: if … then
Flow control: try … then
the
" "

Valid HTML   Valid CSS