With all Vipsi command syntax: Functions Functions Glossary: Functionfunctions which take exactly one Vipsi command syntax: Arguments Glossary: Argumentsargument, Flow control: if … then Flow control: try … thenthe Separators: Round brackets "( … )" Functions with varying return types: bracket expression "()"parenthesis may be omitted, Flow control: if … then Flow control: if … thenif the Vipsi command syntax: Arguments Glossary: Argumentsargument is a simple Glossary: Valuevalue Operators: Boolean And with Variable "&&=" Operators: Bitwise And with Variable "&=" Operators: Bitwise And "&" Operators: Boolean And "&&"and no Vipsi command syntax: Expressions Glossary: Expressionexpression with Vipsi command syntax: Operators Operators Glossary: Operatoroperators. Flow control: if … then Flow control: if … thenIf the Vipsi command syntax: Arguments Glossary: Argumentsargument is a Vipsi command syntax: Expressions Glossary: Expressionexpression, Flow control: if … then Flow control: try … thenthen you must use Separators: Round brackets "( … )" Functions with varying return types: bracket expression "()"parenthesis.
Numeric functions: sinsin 2*Constants: pipi == Numeric functions: sinsin(2) * Constants: pipi != Numeric functions: sinsin(2*Constants: pipi)
Separators: Curly brackets "{ … }" Instructions: Local scope "{}"Braces { ... } are used to enclose ranges of program code with a private Glossary: Variable, var_refvariable scope Operators: Boolean And with Variable "&&=" Operators: Bitwise And with Variable "&=" Operators: Bitwise And "&" Operators: Boolean And "&&"and for Literals: List literals Lists and arrays: List literalslist literals. List functions: thisThis depends on Flow control: if … then Flow control: try … thenthe place where they are encountered. Flow control: if … thenIf a Separators: Curly brackets "{ … }" Instructions: Local scope "{}"brace occurs Operators: Make Identifier "@"at Flow control: if … then Flow control: try … thenthe place of an Vipsi command syntax: Instructions Instructions Glossary: Instructioninstruction Flow control: if … then Flow control: try … thenthen it starts a private Glossary: Variable, var_refvariable scope. Flow control: if … thenIf a Separators: Curly brackets "{ … }" Instructions: Local scope "{}"brace occurs Operators: Make Identifier "@"at Flow control: if … then Flow control: try … thenthe position of an Vipsi command syntax: Expressions Glossary: Expressionexpression Flow control: if … then Flow control: try … thenthen it is Flow control: if … then Flow control: try … thenthe beginning of a Literals: List literals Lists and arrays: List literalslist literal.
Flow control: if … then Flow control: try … thenThe only place where List functions: thisthis may lead to confusion is Flow control: if … then Flow control: try … thenthe vipsi shell: Operators: Make Identifier "@"At Flow control: if … then Flow control: try … thenthe start of Flow control: if … then Flow control: try … thenthe command line Flow control: if … then Flow control: try … thenthe parser expects an Vipsi command syntax: Instructions Instructions Glossary: Instructioninstruction. For your convenience it is also possible to just type an Vipsi command syntax: Expressions Glossary: Expressionexpression 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 shell will print Flow control: if … then Flow control: try … thenthe result. Thus Flow control: if … thenif you just type in
{ x=22, y=1.5, z=0 }
to see whether vipsi evaluates your Literals: List literals Lists and arrays: List literalslist literal as expected, Flow control: if … then Flow control: try … thenthen Flow control: if … then Flow control: try … thenthe opening { stands Operators: Make Identifier "@"at Flow control: if … then Flow control: try … thenthe position of an Vipsi command syntax: Instructions Instructions Glossary: Instructioninstruction Operators: Boolean And with Variable "&&=" Operators: Bitwise And with Variable "&=" Operators: Bitwise And "&" Operators: Boolean And "&&"and should be handled as Flow control: if … then Flow control: try … thenthe start of a range of Vipsi command syntax: Statements Glossary: Statementstatements with private Glossary: Variable, var_refvariable scope.
As of version 0.8.8 Flow control: if … then Flow control: try … thenthe shell has some automagic intelligence to detect List functions: thisthis. Flow control: if … thenIf a command line starts with an opening Separators: Curly brackets "{ … }" Instructions: Local scope "{}"brace { Flow control: if … then Flow control: try … thenthen Flow control: if … then Flow control: try … thenthe shell defaults to a Literals: List literals Lists and arrays: List literalslist literal, except Flow control: if … thenif it contains a Separators: Semicolon ";"semicolon ";" Operators: Boolean Or with Variable "||=" Operators: Bitwise Or with Variable "|=" Operators: Bitwise Or "|" Operators: Boolean Or "||"or a pure Vipsi command syntax: Instructions Instructions Glossary: Instructioninstruction like Instructions: var How does VScript::Value() work?: Var*&var. List functions: thisThis is done by silently putting a Instructions: putput Vipsi command syntax: Statements Glossary: Statementstatement in front of Flow control: if … then Flow control: try … thenthe Data Types: Lists and arrays Item selector "[]": Lists Glossary: list, list_vallist 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 printed result is Operators: Bitwise Not "~" Operators: Boolean Negation "!"not always identical to what would be printed Flow control: if … thenif it would have been evaluated as an Vipsi command syntax: Expressions Glossary: Expressionexpression without glue.
Numeric functions: log Numeric functions: loge Instructions: loglog is used as an Vipsi command syntax: Instructions Instructions Glossary: Instructioninstruction which prints it's Vipsi command syntax: Arguments Glossary: Argumentsarguments to Constants: stderrstderr Operators: Boolean And with Variable "&&=" Operators: Bitwise And with Variable "&=" Operators: Bitwise And "&" Operators: Boolean And "&&"and as a Vipsi command syntax: Functions Functions Glossary: Functionfunction to calculate Flow control: if … then Flow control: try … thenthe logarithm of any Glossary: number, num_valnumber to any Integer numbers: Base 256base. Flow control: if … then Flow control: try … thenThe meaning depends on Flow control: if … then Flow control: try … thenthe place where Numeric functions: log Numeric functions: loge Instructions: loglog is encountered. Flow control: if … thenIf it occurs Operators: Make Identifier "@"at Flow control: if … then Flow control: try … thenthe place of an Vipsi command syntax: Instructions Instructions Glossary: Instructioninstruction Flow control: if … then Flow control: try … thenthen it is Flow control: if … then Flow control: try … thenthe Vipsi command syntax: Instructions Instructions Glossary: Instructioninstruction Numeric functions: log Numeric functions: loge Instructions: loglog which prints it Vipsi command syntax: Arguments Glossary: Argumentsarguments to Constants: stderrstderr. Flow control: if … thenIf it occurs Operators: Make Identifier "@"at Flow control: if … then Flow control: try … thenthe place of an Vipsi command syntax: Expressions Glossary: Expressionexpression Flow control: if … then Flow control: try … thenthen it is Flow control: if … then Flow control: try … thenthe Vipsi command syntax: Functions Functions Glossary: Functionfunction Numeric functions: log Numeric functions: loge Instructions: loglog.
Flow control: if … then Flow control: try … thenThe only place where List functions: thisthis may lead to confusion is Flow control: if … then Flow control: try … thenthe vipsi shell: Operators: Make Identifier "@"At Flow control: if … then Flow control: try … thenthe start of Flow control: if … then Flow control: try … thenthe command line Flow control: if … then Flow control: try … thenthe parser expects an Vipsi command syntax: Instructions Instructions Glossary: Instructioninstruction. For your convenience it is also possible to just type an Vipsi command syntax: Expressions Glossary: Expressionexpression 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 shell will print Flow control: if … then Flow control: try … thenthe result. Thus Flow control: if … thenif you just type in
Numeric functions: log Numeric functions: loge Instructions: loglog(2,8)
to see what Flow control: if … then Flow control: try … thenthe logarithm of 8 to Integer numbers: Base 256base 2 is, Flow control: if … then Flow control: try … thenthen Flow control: if … then Flow control: try … thenthe List functions: words Shell Immediate Commands: wordsword Numeric functions: log Numeric functions: loge Instructions: loglog stands Operators: Make Identifier "@"at Flow control: if … then Flow control: try … thenthe position of an Vipsi command syntax: Instructions Instructions Glossary: Instructioninstruction Operators: Boolean And with Variable "&&=" Operators: Bitwise And with Variable "&=" Operators: Bitwise And "&" Operators: Boolean And "&&"and should be handled as Flow control: if … then Flow control: try … thenthe Vipsi command syntax: Instructions Instructions Glossary: Instructioninstruction Numeric functions: log Numeric functions: loge Instructions: loglog.
As of version 0.8.8 Flow control: if … then Flow control: try … thenthe shell has some automagic intelligence to detect List functions: thisthis. Flow control: if … thenIf a command line starts with Numeric functions: log Numeric functions: loge Instructions: loglog Flow control: if … then Flow control: try … thenthen Flow control: if … then Flow control: try … thenthe shell inspects Flow control: if … then Flow control: try … thenthe Flow control: nextnext token. Flow control: if … thenIf it is an opening Separators: Round brackets "( … )" Functions with varying return types: bracket expression "()"parenthesis ( Flow control: if … then Flow control: try … thenthen Flow control: if … then Flow control: try … thenthe shell defaults to an Vipsi command syntax: Expressions Glossary: Expressionexpression Operators: Boolean And with Variable "&&=" Operators: Bitwise And with Variable "&=" Operators: Bitwise And "&" Operators: Boolean And "&&"and Numeric functions: log Numeric functions: loge Instructions: loglog will be handled as Flow control: if … then Flow control: try … thenthe logarithm Vipsi command syntax: Functions Functions Glossary: Functionfunction. List functions: thisThis is done by silently putting a Instructions: putput Vipsi command syntax: Instructions Instructions Glossary: Instructioninstruction in front of Numeric functions: log Numeric functions: loge Instructions: loglog 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 printed result is Operators: Bitwise Not "~" Operators: Boolean Negation "!"not always identical to what would be printed Flow control: if … thenif it was evaluated as an Vipsi command syntax: Expressions Glossary: Expressionexpression without glue.
Flow control: if … thenIf a Vipsi command syntax: Statements Glossary: Statementstatement after a Vipsi command syntax: Statements Glossary: Statementstatement with Vipsi command syntax: Arguments Glossary: Argumentsarguments starts with '-', '+' Operators: Boolean Or with Variable "||=" Operators: Bitwise Or with Variable "|=" Operators: Bitwise Or "|" Operators: Boolean Or "||"or '%' Flow control: if … then Flow control: try … thenthen List functions: thisthis character is Operators: Bitwise Not "~" Operators: Boolean Negation "!"not recognized as a Glossary: number, num_valnumber Numeric functions: signsign start of a Integer numbers: Binary Floating point: Binary Text functions: binstrbinary Literals: Number literals Numbers: Number literalsnumber literal but interpreted as Vipsi command syntax: Operators Operators Glossary: Operatoroperator Operators: Subtract "-"minus, Operators: Add "+"plus Operators: Boolean Or with Variable "||=" Operators: Bitwise Or with Variable "|=" Operators: Bitwise Or "|" Operators: Boolean Or "||"or Operators: Remainder with Variable "%=" Operators: Remainder "%"remainder linking it to Flow control: if … then Flow control: try … thenthe last Vipsi command syntax: Arguments Glossary: Argumentsargument of Flow control: if … then Flow control: try … thenthe previous Vipsi command syntax: Instructions Instructions Glossary: Instructioninstruction.
List functions: thisThis will almost certainly happen only in broken code.
In a sane program, each Vipsi command syntax: Statements Glossary: Statementstatement starts with an Vipsi command syntax: Identifiers (names) Identifiers, names Operators: Make Identifier "@" Glossary: Name, Identifieridentifier Vipsi command syntax: Identifiers (names) Identifiers, names Operators: Make Identifier "@" Text functions: name Glossary: Name, Identifiername:
Flow control: if … thenIf a Vipsi command syntax: Statements Glossary: Statementstatement starts with '%', '+' Operators: Boolean Or with Variable "||=" Operators: Bitwise Or with Variable "|=" Operators: Bitwise Or "|" Operators: Boolean Or "||"or '-', Flow control: if … then Flow control: try … thenthen List functions: thisthis Vipsi command syntax: Expressions Glossary: Expressionexpression will Flow control: returnreturn a result Glossary: Valuevalue. In a Example Scripts: CGI Scripts Example Scripts: Scriptsscript List functions: thisthis result Glossary: Valuevalue will be discarded. I can hardly think of any useful code, with a Vipsi command syntax: Statements Glossary: Statementstatement beginning with a numeric Glossary: Valuevalue. Operators: Boolean And with Variable "&&=" Operators: Bitwise And with Variable "&=" Operators: Bitwise And "&" Operators: Boolean And "&&"And all examples i can imagine are lunatic Operators: Boolean Or with Variable "||=" Operators: Bitwise Or with Variable "|=" Operators: Bitwise Or "|" Operators: Boolean Or "||"or malicious.
#!/usr/local/bin/vipsi
// very broken:
+123 Instructions: var How does VScript::Value() work?: Var*&var a=0
-123 Instructions: var How does VScript::Value() work?: Var*&var b=0
+123 Instructions: var How does VScript::Value() work?: Var*&var c=0
%011
Instructions: putput Constants: nlnl, "-> ", a, Constants: tabtab, b, Constants: tabtab, c, Constants: nlnl
// very insane:
Instructions: procproc mySideEffect(a){ Instructions: putput a; Flow control: returnreturn a }
Instructions: putput 222
+mySideEffect(77)
Even in Flow control: if … then Flow control: try … thenthe shell Flow control: if … thenif you want to print Flow control: if … then Flow control: try … thenthe result of an Vipsi command syntax: Expressions Glossary: Expressionexpression, 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 Vipsi command syntax: Expressions Glossary: Expressionexpression starts with a Literals: Number literals Numbers: Number literalsnumber literal which starts with '%', '+' Operators: Boolean Or with Variable "||=" Operators: Bitwise Or with Variable "|=" Operators: Bitwise Or "|" Operators: Boolean Or "||"or '-', List functions: thisthis is no problem, because you'll rarely append such a calculation after another Vipsi command syntax: Instructions Instructions Glossary: Instructioninstruction with Vipsi command syntax: Arguments Glossary: Argumentsarguments. List functions: thisThis would look pretty insane:
vipsi> Instructions: putput 100 -123 -23
vipsi> Instructions: putput 100 +123 223
vipsi> Instructions: putput 100 %011 1
vipsi>
Flow control: if … thenIf you successfully construct a case where it matters, use Instructions: putput Operators: Boolean Or with Variable "||=" Operators: Bitwise Or with Variable "|=" Operators: Bitwise Or "|" Operators: Boolean Or "||"or enclose it in Separators: Round brackets "( … )" Functions with varying return types: bracket expression "()"parenthesis:
vipsi> Flow control: if … then Flow control: if … thenif 1 -123 then /* prints nothing */
vipsi> Flow control: if … thenif 1 Instructions: putput -123 Flow control: if … then Flow control: try … thenthen -123
vipsi> Flow control: if … then Flow control: if … thenif 1 (-123) then -123
vipsi> Flow control: if … then Flow control: if … thenif 1; -123 then -123
vipsi>
These two Vipsi command syntax: Instructions Instructions Glossary: Instructioninstructions are special in Flow control: if … then Flow control: try … thenthe way, that they are Flow control: if … then Flow control: try … thenthe only Vipsi command syntax: Instructions Instructions Glossary: Instructioninstructions which can optionally take no Operators: Boolean Or with Variable "||=" Operators: Bitwise Or with Variable "|=" Operators: Bitwise Or "|" Operators: Boolean Or "||"or one Vipsi command syntax: Arguments Glossary: Argumentsargument. All other Vipsi command syntax: Instructions Instructions Glossary: Instructioninstructions can take either no Operators: Boolean Or with Variable "||=" Operators: Bitwise Or with Variable "|=" Operators: Bitwise Or "|" Operators: Boolean Or "||"or Operators: Make Identifier "@"at least one Vipsi command syntax: Arguments Glossary: Argumentsargument. List functions: thisThis is important for Flow control: if … then Flow control: try … thenthe parser, because it must know whether Flow control: if … then Flow control: try … thenthe Vipsi command syntax: Expressions Glossary: Expressionexpression after an Vipsi command syntax: Instructions Instructions Glossary: Instructioninstruction must be interpretet as an Vipsi command syntax: Arguments Glossary: Argumentsargument to that Vipsi command syntax: Instructions Instructions Glossary: Instructioninstruction Operators: Boolean Or with Variable "||=" Operators: Bitwise Or with Variable "|=" Operators: Bitwise Or "|" Operators: Boolean Or "||"or as a Instructions: newnew Vipsi command syntax: Instructions Instructions Glossary: Instructioninstruction, even Flow control: if … thenif it yields a result. Flow control: if … then Flow control: try … thenThe latter case is very common, because Flow control: if … then Flow control: try … thenthe Operators: Assignment "=" Built-in operators: Assignments:assignment Vipsi command syntax: Operators Operators Glossary: Operatoroperators all Flow control: returnreturn Flow control: if … then Flow control: try … thenthe assigned Glossary: Valuevalue (acually a reference to Flow control: if … then Flow control: try … thenthe Glossary: Variable, var_refvariable) as result! Therefore:
Instructions: putput a=22
will Operators: Assignment "="assign 22 to a Operators: Boolean And with Variable "&&=" Operators: Bitwise And with Variable "&=" Operators: Bitwise And "&" Operators: Boolean And "&&"and print Flow control: if … then Flow control: try … thenthe result, which is 22. Flow control: whileWhile
Instructions: putput "x" a=22
will print "x" but Operators: Bitwise Not "~" Operators: Boolean Negation "!"not Flow control: if … then Flow control: try … thenthe result of Flow control: if … then Flow control: try … thenthe Operators: Assignment "=" Built-in operators: Assignments:assignment a=22, because that is a Instructions: newnew Vipsi command syntax: Instructions Instructions Glossary: Instructioninstruction. Flow control: if … thenIf you wanted to print both, "x" Operators: Boolean And with Variable "&&=" Operators: Bitwise And with Variable "&=" Operators: Bitwise And "&" Operators: Boolean And "&&"and "22", Flow control: if … then Flow control: try … thenthen you needed to append a=22 with a Separators: Comma ","comma "," to Flow control: if … then Flow control: try … thenthe Vipsi command syntax: Arguments Glossary: Argumentsargument Data Types: Lists and arrays Item selector "[]": Lists Glossary: list, list_vallist of Instructions: putput.
Additionally, Flow control: if … then Flow control: if … thenif the Flow control: nextnext Vipsi command syntax: Instructions Instructions Glossary: Instructioninstruction is self-defined Vipsi command syntax: Procedures Data Types: Procedures Glossary: Procedureprocedure, Flow control: if … then Flow control: try … thenthe parser Flow control: do … loopdoes Operators: Bitwise Not "~" Operators: Boolean Negation "!"not know whether it will Flow control: returnreturn a result Operators: Boolean And with Variable "&&=" Operators: Bitwise And with Variable "&=" Operators: Bitwise And "&" Operators: Boolean And "&&"and assume that it will. List functions: thisThis makes no difference for a Vipsi command syntax: Procedures Data Types: Procedures Glossary: Procedureprocedure written Operators: Make Identifier "@"at Flow control: if … then Flow control: try … thenthe place of an Vipsi command syntax: Instructions Instructions Glossary: Instructioninstruction, because either it Flow control: do … loopdoes Operators: Bitwise Not "~" Operators: Boolean Negation "!"not Flow control: returnreturn a result 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 returned result will be discarded. (Operators: Bitwise Not "~" Operators: Boolean Negation "!"note: on Flow control: if … then Flow control: try … thenthe vipsi shell printed for your convenience.)
Therefore Flow control: if … then Flow control: try … thenthe parser has a little problem with Flow control: returnreturn Operators: Boolean Or with Variable "||=" Operators: Bitwise Or with Variable "|=" Operators: Bitwise Or "|" Operators: Boolean Or "||"or Flow control: end Shell Immediate Commands: exit, quit, endend, which may Operators: Boolean Or with Variable "||=" Operators: Bitwise Or with Variable "|=" Operators: Bitwise Or "|" Operators: Boolean Or "||"or may Operators: Bitwise Not "~" Operators: Boolean Negation "!"not be followed by an Vipsi command syntax: Arguments Glossary: Argumentsargument. How to decide? Flow control: if … then Flow control: try … thenThe stunning fact is, it's Shell Immediate Commands: exit, quit, endquite easy: Because both Vipsi command syntax: Instructions Instructions Glossary: Instructioninstructions break from Flow control: if … then Flow control: try … thenthe program flow, Flow control: if … then Flow control: try … thenthe Flow control: nextnext Vipsi command syntax: Instructions Instructions Glossary: Instructioninstruction won't be executed. Therefore in a proper program Flow control: if … then Flow control: try … thenthe Flow control: nextnext Vipsi command syntax: Instructions Instructions Glossary: Instructioninstruction can only be a switching Operators: Boolean Or with Variable "||=" Operators: Bitwise Or with Variable "|=" Operators: Bitwise Or "|" Operators: Boolean Or "||"or terminating Vipsi command syntax: Flow control Flow controlflow control List functions: words Shell Immediate Commands: wordsword: Flow control: if … then Flow control: try … thenelse, Flow control: if … thenelif, Flow control: if … then Flow control: try … thenthen Operators: Boolean Or with Variable "||=" Operators: Bitwise Or with Variable "|=" Operators: Bitwise Or "|" Operators: Boolean Or "||"or Flow control: do … looploop. Every other List functions: words Shell Immediate Commands: wordsword makes no sense. So Flow control: if … then Flow control: try … thenthe Flow control: returnreturn Operators: Boolean And with Variable "&&=" Operators: Bitwise And with Variable "&=" Operators: Bitwise And "&" Operators: Boolean And "&&"and Flow control: end Shell Immediate Commands: exit, quit, endend handler just test, whether Flow control: if … then Flow control: try … thenthe Flow control: nextnext List functions: words Shell Immediate Commands: wordsword is one of those List functions: words Shell Immediate Commands: wordswords (actually they test for 'Invariants: Built-in instructionsbuilt-in instruction returning no Glossary: Valuevalue') Operators: Boolean And with Variable "&&=" Operators: Bitwise And with Variable "&=" Operators: Bitwise And "&" Operators: Boolean And "&&"and Flow control: returnreturns with no result Operators: Boolean Or with Variable "||=" Operators: Bitwise Or with Variable "|=" Operators: Bitwise Or "|" Operators: Boolean Or "||"or evaluates Flow control: if … then Flow control: try … thenthe following Vipsi command syntax: Expressions Glossary: Expressionexpression.
There is no problem. Except in one situation, which stunningly often happens to me:
When a program fails somehow Operators: Boolean And with Variable "&&=" Operators: Bitwise And with Variable "&=" Operators: Bitwise And "&" Operators: Boolean And "&&"and i debug it, i often Instructions: putput in a Flow control: returnreturn somewhere. Operators: Boolean And with Variable "&&=" Operators: Bitwise And with Variable "&=" Operators: Bitwise And "&" Operators: Boolean And "&&"And that position, self-evidently is Operators: Bitwise Not "~" Operators: Boolean Negation "!"not before one of Flow control: if … then Flow control: try … thenthe terminating Vipsi command syntax: Flow control Flow controlflow control List functions: words Shell Immediate Commands: wordsword. Frequently enough before a Functions with varying return types: call Instructions: callcall to a self-defined Vipsi command syntax: Procedures Data Types: Procedures Glossary: Procedureprocedure Operators: Boolean And with Variable "&&=" Operators: Bitwise And with Variable "&=" Operators: Bitwise And "&" Operators: Boolean And "&&"and Flow control: if … then Flow control: try … thenthen Flow control: if … then Flow control: try … thenthe Vipsi command syntax: Procedures Data Types: Procedures Glossary: Procedureprocedure Functions with varying return types: call Instructions: callcall after Flow control: if … then Flow control: try … thenthe Flow control: returnreturn unexpectedly Instructions: getgets called before Flow control: returnreturn Flow control: returnreturns, just because Flow control: if … then Flow control: try … thenthe parser assumes that it delivers an Vipsi command syntax: Arguments Glossary: Argumentsargument. Puzzled me sometimes.
From a real-world case:
Instructions: procproc Doit()
{
QuelltextEinlesen()
TagsAbtrennen()
Flow control: returnreturn // <-- inserted for testing
TagsBehandeln()
AnkerErzeugen()
QuerverweiseEinfügen()
BuchNachHtmlKonvertieren()
BuchdateienSchreiben()
}
In Flow control: if … then Flow control: try … thenthe case above Flow control: if … then Flow control: try … thenthe Vipsi command syntax: Procedures Data Types: Procedures Glossary: Procedureprocedure TagsBehandeln() was called despite Flow control: if … then Flow control: try … thenthe Flow control: returnreturn in front of it. List functions: thisThis is, as you can see, because i never terminate my Vipsi command syntax: Instructions Instructions Glossary: Instructioninstructions with Separators: Semicolon ";"semicolons ";" as i should Flow control: do … loopdo. Just adding a Separators: Semicolon ";"semicolon ";" after Flow control: if … then Flow control: try … thenthe Flow control: returnreturn did remedy Flow control: if … then Flow control: try … thenthe problem.
Ever wondered why there is 1 subtracted when storing Flow control: if … then Flow control: try … thenthe Numeric functions: countcount of List functions: globals Shell Immediate Commands: globalsglobal Glossary: Variable, var_refvariables into a Glossary: Variable, var_refvariable, which frequently happens to be named argc?
It's no bug, work-around Operators: Boolean Or with Variable "||=" Operators: Bitwise Or with Variable "|=" Operators: Bitwise Or "|" Operators: Boolean Or "||"or even an ambiguity, it's just that Numeric functions: countcount List functions: globals Shell Immediate Commands: globalsglobals is executed after Instructions: var How does VScript::Value() work?: Var*&var argc, Operators: Boolean And with Variable "&&=" Operators: Bitwise And with Variable "&=" Operators: Bitwise And "&" Operators: Boolean And "&&"and therefore Flow control: if … then Flow control: try … thenthe Glossary: Variable, var_refvariable argc already Numeric functions: existsexists when Numeric functions: countcount Numeric functions: countcounts Flow control: if … then Flow control: try … thenthe Glossary: number, num_valnumber of List functions: globals Shell Immediate Commands: globalsglobal Glossary: Variable, var_refvariables. So Flow control: if … then Flow control: try … thenthe Numeric functions: countcount will Functions with varying return types: include Instructions: includeinclude Glossary: Variable, var_refvariable argc Operators: Boolean And with Variable "&&=" Operators: Bitwise And with Variable "&=" Operators: Bitwise And "&" Operators: Boolean And "&&"and we Operators: Subtract from Variable "-=" Operators: Subtract "-"subtract 1 for that fact.
Just to Operators: Bitwise Not "~" Operators: Boolean Negation "!"note it somewhere.
|