[ library(viewable) | The ECLiPSe Libraries | Reference Manual | Alphabetic Index ]

# viewable_type(++ViewableName, ?Type)

Query the type of an existent viewable.

ViewableName
  A string or atom: the name of an existent viewable
Type
  The type of the viewable.

## Description

NOTE:When there are no registered visualisation clients, this predicate fails with all arguments, and has no effect.

If ViewableName is the name of an existent viewable, Type is unified with its type. See `viewable_create/3` for a discussion of valid viewable types.

### Fail Conditions

Fails if ViewableName is not instantiated to the name of an existent viewable, or if Type fails to unify with the viewable's type.

### Resatisfiable

no

### Exceptions

(4) instantiation fault
  ViewableName is not a string or an atom

## Examples

    [Assuming that at least one visualisation client is registered]

    	Success:

    	viewable_create(v1, []([](R,S), [](Q,W)),
    			array([fixed, fixed], any)),
    	viewable_type(v1, X).

            [gives X = array([fixed, fixed], any)]

    	Failure:

    	viewable_create(v1, []([](R,S), [](Q,W)),
    		array([fixed, fixed], any)),
    	viewable_type(v1, q).

    	Exceptions raised:

    	viewable_create(v1, []([](R,S), [](Q,W)),
    		array([fixed, fixed], any)),
    	viewable_type(123, _).
            [gives error 4]

## See Also

viewable_create / 3, viewable_size / 2, viewable_expand / 3