User Tools

Site Tools


function

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
function [2014/07/12 13:53]
l
function [2017/10/10 00:39] (current)
Line 1: Line 1:
 +<- [[expression|About Expressions]] --------- [[print|Printing Variables and Functions]] ->
 +
 ===== Functions ===== ===== Functions =====
  
Line 71: Line 73:
 With your sword and hat, nothing can stop you! With your sword and hat, nothing can stop you!
 <<​endif>>​\</​code>​ <<​endif>>​\</​code>​
 +
 +**Advanced use**: if you want to display something on every third time you visit a passage (no matter if you visit it 3 times, 10 times, or 100 times), then you can use the [[expression|modulo operator]] ''​%''​ to transform the number:
 +<​code><<​if visited() % 3 is 0>>\
 +"Every 3 visits to this passage, I walk the Earth again,"​ croons Count Dracula.
 +<<​endif>>​\</​code>​
 +Feel free to modify the "​3"​ to any number you wish, to make something happen on every four visits, every ten visits, etc.
  
 ====visitedTag(string,​ string...)==== ====visitedTag(string,​ string...)====
Line 133: Line 141:
  
  
 +<- [[expression|About Expressions]] --------- [[print|Printing Variables and Functions]] ->
  
function.1405173194.txt.gz ยท Last modified: 2017/10/10 00:37 (external edit)