# Arrays and relational expressions

Individual elements of dimensioned and dynamic arrays are
compared in relational expressions using the standard syntax.

## Example(s)

Compares an element in the dimensioned
array `a` to the value `x`. If any element
equals `x`, the `then` command is performed.

```
dim a(10)
if a(element.exp) = "x" then...
```
Checks that an attribute position in the dynamic array `s` is greater-than or equal to `10`.

```
if s<attr.exp> >= "10" then...
```
Checks an element of a dimensioned array `a` for a string in the attribute, value, and subvalue.

```
dim a(10,10)
if a(row.num,col.num)<ac.exp,vc.exp,sc.exp> = "x" then...
```

## See also

- [() reserved characters](https://d3codex.com/pickbasic-flashbasic/parenthesis-reserved-characters/)
- [Array variable](https://d3codex.com/pickbasic-flashbasic/array-variable/)
- [Assignment](https://d3codex.com/pickbasic-flashbasic/assignment/)
- [lt relational operator](https://d3codex.com/pickbasic-flashbasic/lt-relational-operator/)
- [read statement](https://d3codex.com/pickbasic-flashbasic/read-statement/)
- [Relational operators](https://d3codex.com/pickbasic-flashbasic/relational-operators/)

---
Source: https://d3codex.com/pickbasic-flashbasic/arrays-and-relational-expressions/ - part of the D3Codex reference.
