Sun Chili!Soft ASP Sun Chili!Soft
ASP Sun Microsystems

 

ASP Tools Component Random Method

The Random method returns an integer between -32768 to 32767.

Arguments: ASP Tools Component Random Method

None.

Remarks: ASP Tools Component Random Method

This method is similar to the Rnd function, but returns an integer.

To get a positive random integer, use the Abs function.

To get a random integer below a specific value, use the Mod function.

Examples: ASP Tools Component Random Method

<% = Tools.Random %> will display a random integer between -32768 to 32767. For example, -13067.

<% = ( Abs( Tools.Random ) ) %> will display a positive random integer. For example, 23054.

<% = ( Abs( Tools.Random ) ) Mod 100 %> will display a random integer between 0 and 99. For example, 63.

Copyright 2002 Sun Microsystems, Inc. All rights reserved. Legal Notice.