# `view`, `views`

## `view`

_Expression defining a view_
```syntax
view x    view[x]
```

Where `x` is the name of a view as a symbol, returns the expression defining `x` as a string.
The string is the source text of the definition, including any trailing comment.
```q
q)/ define dependency v
q)v::2+a*3
q)a:5
q)v
17
q)view `v                         / view the dependency expression
"2+a*3"
```

## `views`

_List views defined in the default namespace_
```syntax
views[]
```

Returns a sorted list of the views currently defined in the default namespace.
```q
q)w::b*10
q)v::2+a*3
q)views[]
`s#`v`w
```

---

[`value`](value.md#view),
[Metadata](metadata.md)


_Q for Mortals_
[4.11 Views](../learn/q4m/4_Operators.md#411-views-advanced)
