|
Vipsi command syntax: Functions Functions Glossary: FunctionFunctions which Flow control: returnreturn Data Types: Lists and arrays Item selector "[]": Lists Glossary: list, list_vallists.
<list> = List functions: dir Instructions: dir Shell Immediate Commands: dirdir( <text> )
<list> = List functions: dir Instructions: dir Shell Immediate Commands: dirdir <text>
Flow control: returnReturns Flow control: if … then Flow control: try … thenthe contents of directory with path <text>. Flow control: if … then Flow control: try … thenThe 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 … thenthe user's home directory List functions: env Shell Immediate Commands: env Shell Immediate Commands: envenv.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: filefiles to Data Types: Lists and arrays Item selector "[]": Lists Glossary: list, list_vallist in Flow control: if … then Flow control: try … thenthe last path component.
There are also a Shell Immediate Commands Invariants: Shell immediate commandsshell immediate command List functions: dir Instructions: dir Shell Immediate Commands: dirdir, 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: Listinglisting Operators: Boolean And with Variable "&&=" Operators: Bitwise And with Variable "&=" Operators: Bitwise And "&" Operators: Boolean And "&&"and an Vipsi command syntax: Instructions Instructions Glossary: Instructioninstruction List functions: dir Instructions: dir Shell Immediate Commands: dirdir, which creates a directory.
Flow control: if … then Flow control: try … thenThe Shell Scripts: Return values Appendix: Return valuesreturn value is a Data Types: Lists and arrays Item selector "[]": Lists Glossary: list, list_vallist with one item per directory entry. These items itself again are Data Types: Lists and arrays Item selector "[]": Lists Glossary: list, list_vallists with named items. Flow control: if … then Flow control: try … thenThe 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
}
List functions: thisthis is Flow control: if … then Flow control: try … thenthe Text functions: file Instructions: filefile's Vipsi command syntax: Identifiers (names) Identifiers, names Operators: Make Identifier "@" Text functions: name Glossary: Name, Identifiername, as stored in Flow control: if … then Flow control: try … thenthe Text functions: file Instructions: filefile system. Flow control: if … then Flow control: if … thenIf 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: linklink which refers to a directory, Flow control: if … then Flow control: try … thenthen a slash "/" is appended to Flow control: if … then Flow control: try … thenthe filename.
List functions: thisThis is a 4-letter Data Types: Text Item selector "[]": Text Glossary: text, text_valtext 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 … thenthe corresponding letter is written Operators: Make Identifier "@"at it's place, Flow control: if … then Flow control: try … thenelse a dash "-". Flow control: if … then Flow control: try … thenThe first character indicates a symbolic Text functions: link Instructions: linklink with letter "l".
dir: lengthLength is in bytes for Text functions: file Instructions: filefiles 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: linklinks 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 … thenthen dir: lengthlength is 0.
These are Flow control: if … then Flow control: try … thenthe last modification time, Flow control: if … then Flow control: try … thenthe 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 … thenthe last meta data update time, like renaming Flow control: if … then Flow control: try … thenthe Text functions: file Instructions: filefile. Operators: Bitwise Not "~" Operators: Boolean Negation "!"Not all Text functions: file Instructions: filefile system support all time stamps. Flow control: if … then Flow control: try … thenThe 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_valtext with Vipsi command syntax: Functions Functions Glossary: Functionfunction Text functions: datestrdatestr().
<list> = List functions: env Shell Immediate Commands: env Shell Immediate Commands: envenv
Flow control: returnReturns a Data Types: Lists and arrays Item selector "[]": Lists Glossary: list, list_vallist with all environment Glossary: Variable, var_refvariables. Each item in List functions: thisthis Data Types: Lists and arrays Item selector "[]": Lists Glossary: list, list_vallist is named after Flow control: if … then Flow control: try … thenthe environment Glossary: Variable, var_refvariable's Vipsi command syntax: Identifiers (names) Identifiers, names Operators: Make Identifier "@" Text functions: name Glossary: Name, Identifiername Operators: Boolean And with Variable "&&=" Operators: Bitwise And with Variable "&=" Operators: Bitwise And "&" Operators: Boolean And "&&"and Flow control: if … then Flow control: try … thenthe Glossary: text, text_valtext value contains Flow control: if … then Flow control: try … thenthe environment Glossary: Variable, var_refvariable's data. Environment Glossary: Variable, var_refvariables are always Data Types: Text Item selector "[]": Text Glossary: text, text_valtext.
There is also a Shell Immediate Commands Invariants: Shell immediate commandsshell immediate command List functions: env Shell Immediate Commands: env Shell Immediate Commands: envenv 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: Listinglisting of Flow control: if … then Flow control: try … thenthe environment Glossary: Variable, var_refvariables, similar to Flow control: if … then Flow control: try … thenthe 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: Listinglisting generated by Flow control: if … then Flow control: try … thenthe Flow control: if … then Flow control: try … thenthe following Example Scriptsexample script:
Instructions: var How does VScript::Value() work?: Var*&var List functions: env Shell Immediate Commands: env Shell Immediate Commands: envenv
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: envenv
Instructions: var How does VScript::Value() work?: Var*&var Data = List functions: env Shell Immediate Commands: env Shell Immediate Commands: envenv[i]
Text functions: convert Instructions: convertconvert Data from utf8 // rarely really required
Text functions: convert Instructions: convertconvert 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, IdentifierName = Vipsi command syntax: Identifiers (names) Identifiers, names Operators: Make Identifier "@" Text functions: name Glossary: Name, Identifiername List functions: env Shell Immediate Commands: env Shell Immediate Commands: envenv[i]
Instructions: putput Vipsi command syntax: Identifiers (names) Identifiers, names Operators: Make Identifier "@" Text functions: name Glossary: Name, IdentifierName, Text functions: spacestrspacestr(20)[Numeric functions: countcount Vipsi command syntax: Identifiers (names) Identifiers, names Operators: Make Identifier "@" Text functions: name Glossary: Name, IdentifierName to], " = ", Data[to 50], Constants: nlnl
Flow control: do … looploop
<list_ref> = List functions: globals Shell Immediate Commands: globalsglobals
Flow control: returnReturn a reference to Flow control: if … then Flow control: try … thenthe List functions: globals Shell Immediate Commands: globalsglobals Glossary: Variable, var_refvariables Data Types: Lists and arrays Item selector "[]": Lists Glossary: list, list_vallist.
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: globalsglobal Glossary: Variable, var_refvariables from within a Vipsi command syntax: Procedures Data Types: Procedures Glossary: Procedureprocedure 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: globalsglobal 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: globalsglobal data to Text functions: file Instructions: filefile in one go.
Flow control: if … thenIf executed on 'ground level', that is, outside any Vipsi command syntax: Procedures Data Types: Procedures Glossary: Procedureprocedure, Flow control: if … then Flow control: try … thenthen List functions: localslocals Flow control: returnreturns a reference to Flow control: if … then Flow control: try … thenthe List functions: globals Shell Immediate Commands: globalsglobals Data Types: Lists and arrays Item selector "[]": Lists Glossary: list, list_vallist Glossary: Variable, var_refvariable.
e.g.:
Instructions: putput List functions: globals Shell Immediate Commands: globalsglobals
Instructions: procproc Test_A ()
{
Flow control: if … thenif !Numeric functions: existsexists List functions: globals Shell Immediate Commands: globalsglobals.a
Instructions: newnew Instructions: var How does VScript::Value() work?: Var*&var List functions: globals Shell Immediate Commands: globalsglobals.a
Flow control: if … then Flow control: try … thenthen
}
Text functions: file Instructions: filefile "safefile" = List functions: globals Shell Immediate Commands: globalsglobals
List functions: globals Shell Immediate Commands: globalsglobals ##= Text functions: file Instructions: filefile safefile
Operators: Bitwise Not "~" Operators: Boolean Negation "!"Note: Flow control: whilewhile you can save all List functions: globals Shell Immediate Commands: globalsglobals easily, you must use a little trick to load Flow control: if … then Flow control: try … thenthem back, because you cannot Text functions: replace Instructions: replacereplace Flow control: if … then Flow control: try … thenthe Data Types: Lists and arrays Item selector "[]": Lists Glossary: list, list_vallist Glossary: Variable, var_refvariable List functions: globals Shell Immediate Commands: globalsglobals 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 … thenthe old Data Types: Lists and arrays Item selector "[]": Lists Glossary: list, list_vallist to Flow control: if … then Flow control: try … thenthe current one. List functions: thisThis is more a 'merge' than a 'load' though.
There is also a Shell Immediate Commands Invariants: Shell immediate commandsshell immediate command List functions: globals Shell Immediate Commands: globalsglobals, which prints a beautified Data Types: Lists and arrays Item selector "[]": Lists Glossary: list, list_vallist of all List functions: globals Shell Immediate Commands: globalsglobal Glossary: Variable, var_refvariables.
Because of List functions: thisthis you cannot simply type List functions: globals Shell Immediate Commands: globalsglobals in Flow control: if … then Flow control: try … thenthe vipsi shell Flow control: if … thenif you want to see Flow control: if … then Flow control: try … thenthe Data Types: Lists and arrays Item selector "[]": Lists Glossary: list, list_vallist of List functions: globals Shell Immediate Commands: globalsglobals Glossary: Variable, var_refvariable, you would execute Flow control: if … then Flow control: try … thenthe 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 … thenthe Vipsi command syntax: Functions Functions Glossary: Functionfunction List functions: globals Shell Immediate Commands: globalsglobals you must 'hide' Flow control: if … then Flow control: try … thenthe List functions: words Shell Immediate Commands: wordsword somehow from Flow control: if … then Flow control: try … thenthe 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: Scriptsscript:
vipsi> Instructions: putput List functions: globals Shell Immediate Commands: globalsglobals
vipsi> List functions: globals Shell Immediate Commands: globalsglobals
vipsi> ;List functions: globals Shell Immediate Commands: globalsglobals
List functions: globals Shell Immediate Commands: globalsglobals is actually also Flow control: if … then Flow control: try … thenthe real Vipsi command syntax: Identifiers (names) Identifiers, names Operators: Make Identifier "@" Text functions: name Glossary: Name, Identifiername of Flow control: if … then Flow control: try … thenthe List functions: globals Shell Immediate Commands: globalsglobal Glossary: Variable, var_refvariables Data Types: Lists and arrays Item selector "[]": Lists Glossary: list, list_vallist. You can Instructions: renamerename it, but you can always access it with List functions: globals Shell Immediate Commands: globalsglobals.
<text> = List functions: join Instructions: joinjoin( <list_var>, <separator> )
Insert Flow control: if … then Flow control: try … thenthe Separatorsseparator between all Data Types: Text Item selector "[]": Text Glossary: text, text_valtexts 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_valtexts from Flow control: if … then Flow control: try … thenthe Data Types: Lists and arrays Item selector "[]": Lists Glossary: list, list_vallist Glossary: Variable, var_refvariable to one Data Types: Text Item selector "[]": Text Glossary: text, text_valtext. Any item which is Operators: Bitwise Not "~" Operators: Boolean Negation "!"not a Data Types: Text Item selector "[]": Text Glossary: text, text_valtext is converted Text functions: stringto text prior.
There is also an Vipsi command syntax: Instructions Instructions Glossary: Instructioninstruction List functions: join Instructions: joinjoin which stores back Flow control: if … then Flow control: try … thenthe joined Data Types: Text Item selector "[]": Text Glossary: text, text_valtext into Flow control: if … then Flow control: try … thenthe original Glossary: Variable, var_refvariable.
Instructions: var How does VScript::Value() work?: Var*&var mytext = Text functions: file Instructions: filefile "foobär"
mytext = List functions: split Instructions: splitsplit(mytext) // into lines
mytext = List functions: join Instructions: joinjoin(mytext,Constants: nlnl) // rejoin Flow control: if … then Flow control: try … thenthem, inserting unix Constants: nlnl's
<list_ref> = List functions: localslocals
Flow control: returnReturn a reference to Flow control: if … then Flow control: try … thenthe List functions: localslocal Glossary: Variable, var_refvariables Data Types: Lists and arrays Item selector "[]": Lists Glossary: list, list_vallist.
List functions: thisThis is useful Flow control: if … thenif you want to access unnamed Vipsi command syntax: Arguments Glossary: Argumentsarguments in a Vipsi command syntax: Procedures Data Types: Procedures Glossary: Procedureprocedure with a Glossary: Variable, var_refvariable Vipsi command syntax: Arguments Glossary: Argumentsargument Data Types: Lists and arrays Item selector "[]": Lists Glossary: list, list_vallist.
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 … thenthe real Vipsi command syntax: Identifiers (names) Identifiers, names Operators: Make Identifier "@" Text functions: name Glossary: Name, Identifiername of Flow control: if … then Flow control: try … thenthe List functions: localslocal Glossary: Variable, var_refvariables Data Types: Lists and arrays Item selector "[]": Lists Glossary: list, list_vallist. You can Instructions: renamerename it, but you can always access it with List functions: localslocals.
<list> = List functions: split Instructions: splitsplit( <text> )
<list> = List functions: split Instructions: splitsplit( <text> ,<separator> )
<list> = List functions: split Instructions: splitsplit( <list> )
<list> = List functions: split Instructions: splitsplit( <list> ,<separator> )
List functions: split Instructions: splitSplit Flow control: if … then Flow control: try … thenthe Data Types: Text Item selector "[]": Text Glossary: text, text_valtext Operators: Make Identifier "@"at Flow control: if … then Flow control: try … thenthe 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 … thenthe resulting Data Types: Lists and arrays Item selector "[]": Lists Glossary: list, list_vallist of Data Types: Text Item selector "[]": Text Glossary: text, text_valtext chunks. Flow control: if … then Flow control: try … thenThe 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_valtext. 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 … thenthen Flow control: if … then Flow control: try … thenthe Data Types: Text Item selector "[]": Text Glossary: text, text_valtext is List functions: split Instructions: splitsplit 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: splitsplit is passed a Data Types: Lists and arrays Item selector "[]": Lists Glossary: list, list_vallist instead of a Glossary: text, text_valtext value, Flow control: if … then Flow control: try … thenthen it works on all Data Types: Lists and arrays Item selector "[]": Lists Glossary: list, list_vallist items. Recursively.
There is also an Vipsi command syntax: Instructions Instructions Glossary: Instructioninstruction List functions: split Instructions: splitsplit which stores back Flow control: if … then Flow control: try … thenthe Data Types: Lists and arrays Item selector "[]": Lists Glossary: list, list_vallist in Flow control: if … then Flow control: try … thenthe original Glossary: Variable, var_refvariable.
Instructions: var How does VScript::Value() work?: Var*&var mytext = Text functions: file Instructions: filefile "foobär"
mytext = List functions: split Instructions: splitsplit mytext // into lines
mytext = List functions: split Instructions: splitsplit mytext, Constants: tabtab // each line Operators: Make Identifier "@"at Constants: tabtabs
<list_ref> = List functions: thisthis
Flow control: returnReturn a reference to Flow control: if … then Flow control: try … thenthe Data Types: Lists and arrays Item selector "[]": Lists Glossary: list, list_vallist Glossary: Variable, var_refvariable which contains Flow control: if … then Flow control: try … thenthe current Vipsi command syntax: Procedures Data Types: Procedures Glossary: Procedureprocedure.
List functions: thisThis Vipsi command syntax: Functions Functions Glossary: Functionfunction must only be executed inside Vipsi command syntax: Procedures Data Types: Procedures Glossary: Procedureprocedures. It Flow control: returnreturns a reference to Flow control: if … then Flow control: try … thenthe Data Types: Lists and arrays Item selector "[]": Lists Glossary: list, list_vallist which contains Flow control: if … then Flow control: try … thenthe Vipsi command syntax: Procedures Data Types: Procedures Glossary: Procedureprocedure.
Normally a Glossary: Variable, var_refvariable is searched in Flow control: if … then Flow control: try … thenthe current privates context, walking up to Flow control: if … then Flow control: try … thenthe topmost List functions: localslocals Data Types: Lists and arrays Item selector "[]": Lists Glossary: list, list_vallist of Flow control: if … then Flow control: try … thenthe Vipsi command syntax: Procedures Data Types: Procedures Glossary: Procedureprocedure. Flow control: if … then Flow control: try … thenThen Flow control: if … then Flow control: try … thenthe enclosing Data Types: Lists and arrays Item selector "[]": Lists Glossary: list, list_vallist, which contains Flow control: if … then Flow control: try … thenthe Vipsi command syntax: Procedures Data Types: Procedures Glossary: Procedureprocedure, is scanned. Operators: Make Identifier "@"At last Flow control: if … then Flow control: try … thenthe interpreter searches Flow control: if … then Flow control: try … thenthe List functions: globals Shell Immediate Commands: globalsglobals Data Types: Lists and arrays Item selector "[]": Lists Glossary: list, list_vallist.
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 … thenThe Vipsi command syntax: Procedures Data Types: Procedures Glossary: Procedureprocedure might be locally defined inside another Vipsi command syntax: Procedures Data Types: Procedures Glossary: Procedureprocedure. Flow control: if … then Flow control: try … thenThen it can easily access all List functions: localslocal Glossary: Variable, var_refvariables of List functions: thisthis Vipsi command syntax: Procedures Data Types: Procedures Glossary: Procedureprocedure 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: Procedureprocedures into complicated Data Types: Lists and arrays Item selector "[]": Lists Glossary: list, list_vallists 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_valtext,Text1,Text2)
{
Instructions: procproc Text functions: replace Instructions: replaceReplace(Oldtext,NewText)
{
Text functions: replace Instructions: replacereplace Data Types: Text Item selector "[]": Text Glossary: text, text_valtext,OldText,NewText
}
Instructions: var How does VScript::Value() work?: Var*&var z = ")(/&/%&%$§&%"
Text functions: replace Instructions: replaceReplace( Text1, z )
Text functions: replace Instructions: replaceReplace( Text2,Text1 )
Text functions: replace Instructions: replaceReplace( 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 … thenthen
Flow control: returnreturn ++Numeric functions: countCount
}
}
<list> = List functions: words Shell Immediate Commands: wordswords
Flow control: returnReturn a Data Types: Lists and arrays Item selector "[]": Lists Glossary: list, list_vallist of all built-in List functions: words Shell Immediate Commands: wordswords. List functions: thisThis Data Types: Lists and arrays Item selector "[]": Lists Glossary: list, list_vallist 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, Identifiername. 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 … thenthe like.
List functions: thisThis is Flow control: if … then Flow control: try … thenthe Data Types: Lists and arrays Item selector "[]": Lists Glossary: list, list_vallist which i currently (version 0.8.8pre) Instructions: getget from Vipsi command syntax: Functions Functions Glossary: Functionfunction List functions: words Shell Immediate Commands: wordswords:
{ "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: filefile", "List functions: dir Instructions: dir Shell Immediate Commands: dirdir", "Text functions: link Instructions: linklink", "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, Identifiername", "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: logloge", "Numeric functions: log10log10", "Numeric functions: exp Numeric functions: expeexp", "Numeric functions: exp2exp2", "Numeric functions: exp Numeric functions: expeexpe", "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: stringstring", "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: envenv", "List functions: words Shell Immediate Commands: wordswords", "Text functions: info Shell Immediate Commands: infoinfo", "List functions: globals Shell Immediate Commands: globalsglobals", "List functions: localslocals", "List functions: thisthis", "Numeric functions: matchmatch", "Text functions: fullpathfullpath", "Functions with varying return types: eval Instructions: evaleval", "Functions with varying return types: call Instructions: callcall", "Text functions: sys Instructions: syssys", "Functions with varying return types: include Instructions: includeinclude", "Instructions: requirerequire", "List functions: split Instructions: splitsplit", "Text functions: convert Instructions: convertconvert", "Text functions: replace Instructions: replacereplace", "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: loglog", "Instructions: getget", "Instructions: editedit", "Instructions: getchargetchar", "Instructions: writewrite", "Instructions: readread", "Functions with varying return types: ioctl Instructions: ioctlioctl", "Instructions: waitwait", "Instructions: sortsort", "Instructions: rsortrsort", "Instructions: openopen", "Instructions: openinopenin", "Instructions: openoutopenout", "Instructions: closeclose", "Instructions: renamerename", ";", "Instructions: cd Shell Immediate Commands: cdcd", "Instructions: procproc", "Flow control: returnreturn", "Flow control: end Shell Immediate Commands: exit, quit, endend", "Flow control: do … loopdo", "Flow control: if … then Flow control: try … thenthen", "Flow control: if … thenif", "Flow control: if … then Flow control: try … thenelse", "Flow control: if … thenelif", "Flow control: try … thentry", "Flow control: whilewhile", "Flow control: untiluntil", "Flow control: exit Shell Immediate Commands: exit, quit, endexit", "Flow control: nextnext", "Flow control: do … looploop", "tEOF", "//", "/*", "*/", "Shell Immediate Commands: pwdpwd" }
There is also a Shell Immediate Commands Invariants: Shell immediate commandsshell immediate command List functions: words Shell Immediate Commands: wordswords, 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: Listinglisting of all built-in List functions: words Shell Immediate Commands: wordswords, omitting those with no real visual representation. Flow control: if … thenIf you type List functions: words Shell Immediate Commands: wordswords in Flow control: if … then Flow control: try … thenthe vipsi shell you most likely execute List functions: thisthis command. You must prevent Flow control: if … then Flow control: try … thenthe vipsi shell from recognizing List functions: words Shell Immediate Commands: wordswords:
vipsi> List functions: words Shell Immediate Commands: wordswords // invokes Flow control: if … then Flow control: try … thenthe Shell Immediate Commands Invariants: Shell immediate commandsshell immediate command
vipsi> Instructions: putput List functions: words Shell Immediate Commands: wordswords // print Flow control: if … then Flow control: try … thenthe Data Types: Lists and arrays Item selector "[]": Lists Glossary: list, list_vallist of Vipsi command syntax: Functions Functions Glossary: Functionfunction 'List functions: words Shell Immediate Commands: wordswords'
vipsi> ;List functions: words Shell Immediate Commands: wordswords // dito. Operators: Bitwise Not "~" Operators: Boolean Negation "!"note Flow control: if … then Flow control: try … thenthe ";"
vipsi> List functions: words Shell Immediate Commands: wordswords // dito. Operators: Bitwise Not "~" Operators: Boolean Negation "!"note Flow control: if … then Flow control: try … thenthe " "
| |