- Set of Alinous-Script and html
- Basic script and html
- When returned value is not 0
- Script variables
- Existance check of variables
- Type of variables
- The Array variables
- Reserved variables
Set of Alinous-Script and html
The Alinous-Module consists of Alinous-Script and HTML, and sometimes HTML does not exist.
When you write sctipt to download module, or module to redirecting other page, the html file is not necessary.
The execution order is
In the Alinous-Script, these control statements are available.
- if statement
- else statement
- else if statement
- for statement
- while statement
These are basic function, and almost same with other programming languages.
By using debugger, you can check how the script is controled and which line is executed correctly.
If you want to know how to control the case in the html file, please take a look at Case control in html.
Alinous-Core has operators below.
- Execute operaion to the variable
- Binary Operators
- Monadic Operators
- Relational Operators
- Relational Operators
- Logical Operator
Binary operators has 2 operands and return operated value. Next table show you the operator, and the order is one of the priority.
||$val * 10
||$val / 10
||$val % 10
||$val + 10
||Add Integer or double value. If one of the value is string, concatinate them.
||$val - 10
Monadic Operators are below. The priority order of execution is greater than binary operators.
The function is used in Alinous-Script. The are 3 type of function.
- Functions defiled by user in Alinous-Script
- Function's name
- Include function in othe scripts
- Standard functions
- Explorer it with contents assist
- JavaConnector functions
Function defined by user
Next sample is function defined by user in the Alinous-Script.
You can use group name in the funcction name. For example, names like below is available.
The Alinous-Core supports synchronized block to lock the thread. There are 2 type of usage.
- Synchronized block
- Named synchronized block
- Locking scope
- Name of the synchronized block
If the synchronized block used without name, threads are synchronized at the block. A single thread can execute the code inside the block.
The scope of locking in only in this block. If synchronized block is used at other line, or other script, it has nothing todo with them.
Named synchronized block
You can name the synchronized block.A single thread can execute the code inside the named block which has same name.
If error happend in the Alinous-Script, the exception will thrown. Then you can use try-catch-finally block.
- Example of exception
- catch block
Example of exception
Please taka a look at the code below at first.
At line 2, an exception is thrown. And after that, the exception will handled by catch and filanny block.
The exception is DOM variable. By watching debugger, it is shown like below.