[TOC] [Prev] [Next] [Bottom]



<@RANDOM>

Syntax

<@RANDOM [HIGH=high] [LOW=low]>

Description

Returns a random number between HIGH and LOW, inclusive of their values.

The HIGH and LOW attributes may range from zero to 2,147,483,647. If only one attribute is specified, a number between zero and that number is returned. If no attribute is specified, a number between zero and 32767 is returned.

Either of the attributes for <@RANDOM> may be specified using literal values or by using meta tags that return values.

Examples

<@RANDOM HIGH="100" LOW="1">

This example returns a random number between 1 and 100.

<@RANDOM LOW="1" HIGH="<@NUMROWS>">

This example returns a random number between 1 and the number of rows returned by the current action.

<@RANDOM HIGH="<@POSTARG NAME='pickANumber'>">

This example returns a random number between zero and the pickANumber form field value submitted with the current request.

See Also

<@CALC>



[TOC] [Prev] [Next] [Bottom]



docs@pervasive.com

Copyright © 1998, Pervasive Software Inc. All rights reserved.