Built-in functions, Type(), Getglobalaa() – BrightSign BrightScript 3.0 Reference Manual User Manual

Page 53: Rnd()

Advertising
background image

48

BUILT-IN FUNCTIONS

BrightScript features a set of built-in, module-scope, intrinsic functions. A number of file I/O, string, mathematics, and
system functions are also available via the roGlobal object, which is documented in the Object Reference Manual.

Type()

Type(a As Variable) As String


This function returns the type of the passed variable and/or object. See the Object Reference Manual for a list of available
object types.

GetGlobalAA()

GetGlobalAA() As Object


This function fetches the global associative array for the current script.

Rnd()

Rnd(range As Integer) As Integer
Rnd(0) As Float

If passed a positive, non-zero integer, this function returns a pseudo-random integer between 1 and the argument value.
The range includes the argument value: For example, calling

Rnd(55) will return a pseudo-random integer greater than 0

and less than 56.

If passed zero, this function returns a pseudo-random Float value between 0 and 1 if the argument is 0.

Advertising