up: TUPLE     index Zimbu documentation

CLASS TUPLE.tuple<Titem> @public

summary

     

The builtin type tuple. A tuple contains one or more items of possibly different types.

 tuple<int, string> mytuple   # tuple with an int and a string

Besides the object methods, Zimbu has these syntax items for tuple:

 tuple<int, string> tup = [1, "foo"]  # initialize from a list
 int i = tup[0]                       # get tuple item by index
 string s = tup[1]                    # get tuple item by index
 [i, s] = tup                         # unpack

$ToString() string @public  Return a string representation of the tuple: [val1, val2]
 
 

members (alphabetically)

     

FUNC $ToString() string @public

     

Return a string representation of the tuple: [val1, val2]

This invokes ToString() on every item.

license

      Copyright 2013 Bram Moolenaar All Rights Reserved.

      Licensed under the Apache License, Version 2.0. See the LICENSE file or obtain a copy at: http://www.apache.org/licenses/LICENSE-2.0