PageListCalculator
(:input form "{$PageUrl}" get:) (:input hidden action browse:) (:input hidden n {*$FullName}:) (:input default request=1:) (:input text number1 size=3:) (:input select name=mathAction value=plus label=" + ":) (:input select name=mathAction value=minus label=" − ":) (:input text number2 size=5:) (:input submit value="Go":)(:input end:) (:pagelist name={$FullName} fmt=#doMath request=1 count=1:) [-Ranges allowed for correct results, first number:-] 1 − (:pagelist fmt=#showResult count=1000 wrap=inline:)[-, second number:-] 0 − unlimited (:if false:) [[#doMath]] (:if3 [ ! equal "{$$number1}" "" && ! equal "{$$number2}" "" ]:) (:if2 equal "{$$mathAction}" "minus":) {$$number1} − {$$number2} = (:pagelist fmt=#showResult count={$$number1} PageCount=-{$$number2} number1={$$number1} number2={$$number2} wrap=inline:) (:else2:) {$$number1} + {$$number2} = (:pagelist fmt=#showResult count={$$number1}} PageCount={$$number2} number1={$$number1} number2={$$number2} wrap=inline:) (:if2end:) (:if3end:) [[#doMathend]] (:ifend:) (:if false:) [[#showResult]]\ (:template last:)\ {$$PageCount}\ [[#showResultend]]\ (:ifend:) |
Ranges allowed for correct results, first number: 1 − 1000, second number: 0 − unlimited |