I read quickly your code structure tutorial.
I'm too lazy to edit it myself and it's too late to (time to sleep soon), so I'll do it quick here.
so, here's what you can say / edit / add :
- you should use // to comment your comments in code blocks of the wiki.
- language used here is really custom, but uses features of C-like / html / bourne shell
- {} brakets are used to define a block, same way as C-like or other close languages
- "indent by fold" notepad++ plugin is quite useful to reindent xsp scripts (works in most case because of {} if laguage is set to c/c++/c#/java .... )
- blocks must be used after a test, to tell the engine what part of the code must be interpreted for this test. (cases{} are "special" tests, but are tests)
if no {} after a test, so only the first line is interpreted (if test succeed )
- a textor editor configured with c++/c/c#/java or javascript can be used to edit scripts (coloration syntax and blocks will be recognized)
- <some_function> </some_function> are indeed, function blocks. functions seems to be the only blocks declared using SGML (HTML / XML) syntax.
- eveything in [] are tests, as in bourne shell (sh). so everything in [] is something that must be evaluated .
[] at the "root" of a case are values evaluated by the case itself.
Any other [] is a test operator
to be clear
Code:
case (the.variable.that.must.be.evaluated)
{
// we are here in "case root", so this is like : [the.variable.that.must.be.evaluated = ONE_OF_THE_POSSIBLE_CASE_VARIABLE_VALUE]
[ONE_OF_THE_POSSIBLE_CASE_VARIABLE_VALUE]
{
// a block of code interpreted if : the.variable.that.must.be.evaluated EQUALS ONE_OF_THE_POSSIBLE_VARIABLE_VALUE
}
//we are here in "case root too"
[ONE_OTHER_POSSIBLE_CASE_VARIABLE_VALUE]
{
// a block of code interpreted if : the.variable.that.must.be.evaluated EQUALS ONE_OTHER_POSSIBLE_VARIABLE_VALUE
//we are not in case root, this [] are for a test ("standalone" test, not 'case{}' eval)
[ any.variable = 3 ]
{
// do this code if any.variable equals 3
}
else
{
// do this code if any.variable equals anything but 3
}
}
}
When I'll have more time, I'll check and edit the wiki if still necessary.