[pmwiki-users] Problem with MarkupExpression {(calc)} recipe
James DeVain
jamesdevain at mail.com
Mon Jan 6 20:43:51 CST 2014
Hi, folks. I'm having a problem with the {(calc )} recipe on the page
Cookbook/MarkupExpressionSamples. For example, {(calc 100 + 10)} displays the
correct answer, but {(calc 100 + 010)} shows 108 for some reason. I need be
able to include the seemingly useless preceeding "0" because sometimes I'm
referring a PTV that may not exist, like:
{(calc {$:num_a} + 0{$:num_b})}
but there is no value set for num_b, so the 0 prevents an input error.
Using {(math 100 + 010)} works fine, but I need some of calc's extended math
functions, like 'round', 'floor', etc.
Thanks,
James
More information about the pmwiki-users
mailing list