# str() function

The str() function repeats a *str.exp* the number of times specified in *num.exp*.

## Syntax

```
str(str.exp, num.exp)
```

## Parameter(s)

| str.exp | String to repeat. |
| --- | --- |
| num.exp | Number of times to repeat the string. |

## Example(s)

Prints 79 `a`sterisks
at the current cursor (or print head) position.

```
print str("*",79)
```
Prints a string of `=`. The number of `=` that print is determined by system(2), which contains the current device output width most recently designated
with a TCL term command.

```
print str("=",system(2))
```

## See also

- [BASIC functions](https://d3codex.com/pickbasic-flashbasic/basic-functions/)
- [Numeric expressions](https://d3codex.com/pickbasic-flashbasic/numeric-expressions/)
- [space() function](https://d3codex.com/pickbasic-flashbasic/space-function/)
- [Statements and functions](https://d3codex.com/pickbasic-flashbasic/statements-and-functions/)
- [system() function](https://d3codex.com/pickbasic-flashbasic/system-function/)
- [term command](https://d3codex.com/tcl/term-command/)

---
Source: https://d3codex.com/pickbasic-flashbasic/str-function/ - part of the D3Codex reference.
