User:松/Drafts/Extension:AbuseFilter/Rules format: Difference between revisions
User:松/Drafts/Extension:AbuseFilter/Rules format (view source)
Revision as of 06:24, 1 August 2020
, 3 years agoTranslation code removal
(Translation code removal) |
(Translation code removal) |
||
Line 47:
AbuseFilter has support for non-associative arrays, which can be used like in the following examples.
{{Caution|1=
<syntaxhighlight lang="c">
Line 53:
my_array[0] == 5
length(my_array) == 4
int( my_array ) === 4 //
float( my_array ) === 4.0 //
string(my_array) == "5\n6\n7\n10\n" //
5 in my_array == true
'5' in my_array == true
'5\n6' in my_array == true //
1 in my_array == true //
my_array[] := 57 //
my_array === [ 5, 6, 7, 10, 57 ]
my_array[2] := 42 //
my_array === [ 5, 6, 42, 10, 57 ]
</syntaxhighlight>
▲== Comments == <!--T:20-->
You can specify comments using the following syntax:
/* <translate><!--T:22--> This is a comment</translate> */▼
== Arithmetic ==
You can use basic arithmetic symbols to do arithmetic on variables and literals with the following syntax:
* <code>-</code> — <translate><!--T:25--> Subtract the right-hand operand from the left-hand operand.</translate>
|