Roglobal – BrightSign Object Reference Manual (FW 5.1) User Manual

Page 23

Advertising
background image

15

roGlobal

This object provides a set of standard, module-scope functions that are stored in the global object. If one of these global
functions is referenced, the compiler directs the runtime to call the appropriate global object member.

Note: Global trigonometric functions accept and return values in radians, not degrees.

Interfaces: ifGlobal

The ifGlobal interface provides the following:

CreateObject(name As String) As Object: Creates a BrightScript object corresponding to the specified
class

name. This method returns invalid if object creation fails. Some objects have optional parameters in their

constructor, which must be passed after the class

name.

Example:

sw = CreateObject("roGpioControlPort")
serial = CreateObject("roSerialPort", 0, 9600)

RestartScript(): Exits the current script. The system then scans for a valid autorun file to run.

RestartApplication(): Restarts the BrightSign application.

Sleep(milliseconds As Integer): Instructs the script to pause for a specified amount of time without
wasting CPU cycles. The sleep interval is specified in milliseconds.

asc(letter As String) As Integer: Returns the ASCII code for the first character of the specified string. A
null-string argument will cause an error.

chr(chr As Integer) As String: Returns a one-character string containing a character reflected by the
specified ASCII or control. For example, because quotation marks are normally used as string delimiters, you can
pass ASCII code 34 to this function to add quotes to a string.

len(target_string As String) As Integer: Returns the number of characters in a string.

Advertising