Michael Loftis writes: >idk if there's a floor function but the general solution is floor(rand() * >16) when rand() produces values 0-1(exclusive) IE if random does not >generate 1.0 - dunno implementation details for slax
Yes, XPath has a floor() function that can be used directly in SLAX. https://www.w3.org/TR/1999/REC-xpath-19991116/#section-Number-Functions So you'd say: var $res = floor(rand() * 16); Also see the "number" statement for additional number-formatting options: http://libslax.readthedocs.io/en/latest/content.html#the-number-statement Thanks, Phil _______________________________________________ juniper-nsp mailing list juniper-nsp@puck.nether.net https://puck.nether.net/mailman/listinfo/juniper-nsp