# prime command

The prime BASIC program calculates the next higher and
lower prime number from a specified number.

## Syntax

```
prime {number}
```

## Parameter(s)

| number | If a prime number is not provided with the command, the program requests it. |
| --- | --- |

## Example(s)

```
prime 13

13 is a prime number
the next highest prime number is = 17
the next lowest prime number is = 11
```

```
prime 14

the next highest prime number is = 17
the next lowest prime number is = 13
```

```
prime

PRIME - computes the next greater prime number
Enter a positive integer = 13

13 is a prime number
the next highest prime number is = 17
the next lowest prime number is = 11
```

## See also

- [create-file command](https://d3codex.com/tcl/create-file-command/)

---
Source: https://d3codex.com/tcl/prime-command/ - part of the D3Codex reference.
