This chapter covers all data types that are available in Hollywood. The following five data types are offered by Hollywood:
Number Numeric values like 1, $FF, 3.5, 1.7e8, True, False, 'a' String String of characters; usually used for text e.g. "Hi" Table Collections of items of the same or different types Function User-callable routines Light userdata Handles allocated by functions Nil Used to mark a variable for deletion |
You can find out the data type of a variable by using the GetType() command. E.g.
GetType(1) ---> returns #NUMBER
GetType(2.5) ---> returns #NUMBER
GetType(True) ---> returns #NUMBER
GetType('x') ---> returns #NUMBER
GetType(#STRING) ---> returns #NUMBER
GetType("What am I?") ---> returns #STRING
GetType({1, 2, 3}) ---> returns #TABLE
GetType(DebugPrint) ---> returns #FUNCTION
GetType(CreateBrush(Nil, 100, 100)) ---> returns #LIGHTUSERDATA
GetType(Nil) ---> returns #NIL
|