Saturday, May 10, 2008, 8:18:00 PM, Doug Parker wrote:

> I know

>    {(rand w x)}

> will give me a random number from x to y. Can a hex random function

>    {(hexrand #y #z)}

> be created, or built off the rand function to generate random hex
> values or digits?

Define a decimal to hexadecimal conversion markup expression in
config.php, for instance like:

# add {(dec2hex .....)} markup expression, argument is decimal number
$MarkupExpr['dec2hex'] = 'dechex($args[0])';

Then use in the page for a random hex number (for instance a two
digit hex number)(the random integer gets converted to hex):

{(dec2hex (rand 16 255))}



  ~Hans


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

Reply via email to