SigServer:SignatureMath: Difference between revisions

Jump to navigation Jump to search
(→‎Function Reference: Added div, length, and random)
Line 78: Line 78:


=== Variables ===
=== Variables ===
SigMath have support for variables. It supports both [[SigServer:Variables|AniDB variables]] and [[SigServer:Variables|user defined variables]]. AniDB variables are prefixed with $ and user defined variables with @.
SigMath have support for variables. It supports both [[SigServer:Variables|AniDB variables]] and user defined. AniDB variables are prefixed with $ and user defined variables with @.


'''Example'''
'''Example'''
  <nowiki>{{ $example }}</nowiki>
  <nowiki>{{ $example }}</nowiki>
  <nowiki>{{ @example }}</nowiki>
  <nowiki>{{ @example }}</nowiki>
The first block outputs the AniDB variable named ''example''. The second block outputs the user defined variable named ''example''. A user defined variable may have the same name as an AniDB variable. The variables are only lowercase alphanumeric and may contain _ as well.
The first block outputs the AniDB variable named ''example''. The second block outputs the user defined variable named ''example''. A user defined variable may have the same name as an AniDB variable. The variables are only alphanumeric and may contain _ as well.
 
Setting a variable is quite straight-forward.
 
'''Example'''
<nowiki>{{ @example = "Where's the money Lebowski?" }}</nowiki>
 
This will set the variable ''@example'' to ''Where's the money Lebowski?''.


=== Functions ===
=== Functions ===