# %fputs() function

The %fputs() function writes the string
designated by *str* on the named output *stream*.

## Syntax

```
var = %fputs(str, (char*)stream)
```

## Description

eof (-1) is returned in case
of an error.

## Example(s)

```
equ nl to char(10)
n=%fputs(’Input file name’:nl,(char*)stream)
```

## See also

- [%fgetc() function](https://d3codex.com/pickbasic-flashbasic/percent-fgetc-function/)
- [%fputc() function](https://d3codex.com/pickbasic-flashbasic/percent-fputc-function/)
- [%popen() function](https://d3codex.com/pickbasic-flashbasic/percent-popen-function/)
- [FlashBASIC C functions overview](https://d3codex.com/pickbasic-flashbasic/flashbasic-c-functions-overview/)
- [cfunction statement](https://d3codex.com/pickbasic-flashbasic/cfunction-statement/)

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