Deprecated: Assigning the return value of new by reference is deprecated in
/var/www/siebn.de/wiki/inc/parser/parser.php on line
66
Deprecated: Assigning the return value of new by reference is deprecated in
/var/www/siebn.de/wiki/inc/parser/lexer.php on line
292
Deprecated: Assigning the return value of new by reference is deprecated in
/var/www/siebn.de/wiki/inc/parser/handler.php on line
22
Deprecated: Assigning the return value of new by reference is deprecated in
/var/www/siebn.de/wiki/inc/parser/handler.php on line
49
Deprecated: Assigning the return value of new by reference is deprecated in
/var/www/siebn.de/wiki/inc/parser/handler.php on line
213
Deprecated: Assigning the return value of new by reference is deprecated in
/var/www/siebn.de/wiki/inc/parser/handler.php on line
241
Deprecated: Assigning the return value of new by reference is deprecated in
/var/www/siebn.de/wiki/inc/parser/handler.php on line
295
Deprecated: Assigning the return value of new by reference is deprecated in
/var/www/siebn.de/wiki/inc/parser/handler.php on line
328
Deprecated: Assigning the return value of new by reference is deprecated in
/var/www/siebn.de/wiki/inc/parser/handler.php on line
575
Deprecated: Assigning the return value of new by reference is deprecated in
/var/www/siebn.de/wiki/inc/parser/xhtml.php on line
939
+ Addition
- Subtraction
* Multiplication
/ Division
% Modulus (remainder)
& Bitwise AND
| Bitwise OR (inclusive or)
&& Logical AND
|| Logical OR
!= Relational “not equal to”
== Relational “equal to”
< Relational “less than”
⇐ Relational “less than or equal to”
> Relational “greater than”
>= Relational “greater than or equal to”
RAND A random number.
PIXEL The Element ID of an Pixel.
INGROUP Test if an element is in a group.
MIN will return the lower of both values
MAX will return the higher of both values
^ Exponents
TAN Tangent
SIN Sine
COS Cosine
TAN-1 Arctangent
SIN-1 Arcsine
COS-1 Arccosine
SQRT Square root
A trigger can have a return value. This trigger will return the square of the first parameter:
ON square RETURN ($0 * $0)
To call this function put an asterisk in front of the triggername. For example:
SET a (*square 7)
will set a to 49.
Self defined functions should always be surrounded with parentheses. For example:
SET a (*square (*square 7))
will return (7*7)*(7*7) = 2401.
SIN and COS are floating point operations, but BS2 doesn't have floating point variables, so you have to multiply the parameters by 1000 and devide the result by 1000. This way you get 3 decimal digits. For example “SET a (SIN 7000)” will set “a” to the sin 7 multiplied by 1000. So “a” will be 121. The real value for sin 7 would be 0,121869…
SET tutorialvar 7
will set tutorialvar to 7.
SET tutorialvar (7 * 7)
will set tutorialvar to 49.
SET tutorialvar (5 == 7)
will set tutorialvar to 0.
SET tutorialvar (5 == 5)
will set tutorialvar to 1.
SET tutorialvar (SIN 7000)
will set tutorialvar to sin(7) * 1000 = 121.