Monday, May 12, 2008, 6:30:04 PM, Dominique Faure wrote:

> The MarkupExprPlus recipe already provides the 'sprintf' function
> which is able to format numbers the way you want, as in:

> {(sprintf "%x" (rand 1 255))}

Oh good!

then

{(sprintf "%02x" (rand 1 255))}

will give you a random two-digit hex number


  ~Hans


_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to