type/table - Maple Programming Help

Home : Support : Online Help : Programming : Data Types : Type Checking : Types : type/table

type/table

check for a table

 Calling Sequence type(e, 'table')

Parameters

 e - any expression

Description

 • The expression type(e, 'table') returns the value true if the expression e is a table, and returns the value false otherwise.
 • An expression is a table if it is created in one of several ways:
 - by calling the table constructor
 - by implicit table creation as a result of assignment to an indexed name
 - by calling a procedure with option remember
 • All tables are also of type tabular, but are distinct from rtables. Together, tables and rtables make up the tabular type.
 • For a description of the table data structure and how to create tables, see table.
 Supertypes

Examples

 > $T≔\mathrm{table}\left(\left[11,\mathrm{red},\mathrm{\pi }\right]\right)$
 ${T}{≔}{table}{}\left(\left[{1}{=}{11}{,}{2}{=}{\mathrm{red}}{,}{3}{=}{\mathrm{\pi }}\right]\right)$ (1)
 > $\mathrm{type}\left(T,'\mathrm{table}'\right)$
 ${\mathrm{true}}$ (2)
 > $\mathrm{type}\left(\mathrm{table}\left(\right),'\mathrm{table}'\right)$
 ${\mathrm{true}}$ (3)
 > $\mathrm{type}\left(\mathrm{rtable}\left(\right),'\mathrm{table}'\right)$
 ${\mathrm{false}}$ (4)
 > $\mathrm{type}\left(\mathrm{rtable}\left(\right),'\mathrm{tabular}'\right)$
 ${\mathrm{true}}$ (5)
 > $\mathrm{type}\left(a,'\mathrm{table}'\right)$
 ${\mathrm{false}}$ (6)
 > $a\left[b\right]≔2$
 ${{a}}_{{b}}{≔}{2}$ (7)
 > $\mathrm{type}\left(a,'\mathrm{table}'\right)$
 ${\mathrm{true}}$ (8)
 > $\mathrm{type}\left(\mathrm{op}\left(4,\mathrm{eval}\left(\mathrm{sin}\right)\right),'\mathrm{table}'\right)$
 ${\mathrm{true}}$ (9)