Lasso Soft Inc. > Home

[ integer_random ]

Method

[ integer_random ] provides a random integer. When called with the optional upper and lower params will provide a random integer between the parameters. Lower defaults to 0 when not provided. The method will automatically swap upper and lower if upper is smaller than lower.

  • Syntax
integer_random
integer_random(upper integer, lower integer)
integer_random(upper integer)
integer_random(-upper=upper integer)
integer_random(-upper=upper integer, -lower=lower integer)
Examples
  • Beginner

To return a random integer between 1 and 1000:

Use the [integer_random] method.

Code

integer_random(1000,1)

Result

57

Recent Comments

No Comments found

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft