Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • An object is needed instead of a typed value.  For example, roList maintains a list of objects.
  • If any object exposes the ifInt, ifFloat, or ifString interfaces, that object can be used in any expression that expects a typed value. For example, an roTouchEvent can be used as an integer whose value is the userid of the roTouchEvent.

 

If "o" is of type roInt, then these statements will have the following effects:

  • print o: Prints the value of o.GetInt()
  • i%=o: Assigns the integer i% the value of o.GetInt().
  • k=o: Presumably k is automatically typed, so it becomes another reference to the roInt  o.
  • o=5: This is NOT the same as o.SetInt(5). Instead it releases o, changes the type of o to roINT32 (o is automatically typed), and assigns it to 5.

...

When a function that expects a BrightScript object as a parameter is passed an int, float, or string, BrightScript automatically creates the equivalent object.

...

roString also contains the ifStringOps interface, which provides the following:

Note
titleNote

The function indexes of ifStringOps methods start at zero, while the function indexes of global methods start at one.

...