Product SiteDocumentation Site

5.3.6.4. of (Class Method)


>>-of-+----------------+---------------------------------------><
      |    +-,----+    |
      |    V      |    |
      +-(----item-+--)-+

Returns a newly created single-index array containing the specified item objects. The first item has index 1, the second has index 2, and so on.
If you use the OF method and omit any argument items, the returned array does not include the indexes corresponding to the omitted arguments.

Example 5.131. Array class - of method

a = .array~of("Fred", "Mike", "David")

do name over a
   say name  -- displays "Fred", "Mike", and "David"
end