Tables and Arrays Maple uses the "table" type for collections of information in a tabular form. It is similar to records or structures found in other programming languages. Each entry has an index and a value; you use the table function to create a table and optionally initialize it. For example: > tab := table([key=100, name=joeuser, address=mit]); tab := table([ key = 100 name = joeuser address = mit ]) > tab[name]; joeuser > tab[phone] := `x0-0000`; tab[phone] := x0-0000 > tab; tab > op(tab); table([ phone = x0-0000 key = 100 name = joeuser address = mit ]) The example shows that tables are one of Maple's exceptions to the use of full evaluation. Tables, arrays, and procedures use what is referred to as "last name evaluation". In essence, variables access these objects by reference, not by value. To directly access the value (to copy it, for instance), you need to use the op function described earlier. An array is much like a table, except that you specify an integer range of subscripts. For example: > arr := array(1..2, 1..2); arr := array(1 .. 2, 1 .. 2, []) > arr[1,1] := 1: arr[2,2] := 2: > print(arr); [ 1 arr[1, 2] ] [ ] [ arr[2, 1] 2 ]