[pmwiki-users] Can't use {(substr )} with the {(calc )} recipe

James DeVain jamesdevain at mail.com
Thu Jan 16 23:09:17 CST 2014


Hi, everyone. I'm using the "{(calc)}" recipe at Cookbook/MarkupExpressionSamples. I'm
trying to do this:

(:gen:4708003830:)
{(calc '(substr {$:gen} 0 -8) + 3')}

which should return 50, but I just get "input error!". I've tried it a bunch of different
ways, but nothing works so far. Might be worth mentioning that if I use the "{(math)}"
recipe (from the same page), as in:

{(math (substr {*$:gen} 0 -8) + 3)}

it works fine, however I need to use calc for some of its other features. Any ideas?

Thanks,
James



More information about the pmwiki-users mailing list