Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel
borderColor#3D3D3D
bgColor#F4F4F4
titleColor#3D3D3D
borderWidth0
titleBGColor#3D3D3D
borderStylesolid

ON THIS PAGE

Table of Contents
indent20px

The intrinsic types roInt32 Int32, roFloat, and roString have an  Float, and string have object and interface equivalentequivalents. These are useful in the following situations:

  • 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  the value of o.GetInt().
  • k=o: Presumably k is 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.

...