# matwriteu statement

The matwriteu statement is identical
to the matwrite statement, except the item remains
locked. The matwriteu form keeps the item locked
if it was previously locked by a readu, readvu, or matwriteu statement within
the same program.

## Syntax

```
matwriteu array.var on {file.var,} ID.exp
```

## Description

This statement can optionally
be written matwriteu or writeu. If mat is omitted, a matrix write can be determined
by the definition of the variable, *array.var*.
If no dim statement appears, it is automatically
treated as a dynamic array.

The writeu, matwrite, and matwriteu statements all
wait until the actual disk update takes place before continuing execution
of the program. They are used for critical write-through, such as
error-logging.

## See also

- [begin work statement](https://d3codex.com/pickbasic-flashbasic/begin-work-statement/)
- [Default File Variables](https://d3codex.com/pickbasic-flashbasic/default-file-variables/)
- [dimension statement](https://d3codex.com/pickbasic-flashbasic/dimension-statement/)
- [= assignment operator](https://d3codex.com/pickbasic-flashbasic/equals-assignment-operator/)
- [mat statement](https://d3codex.com/pickbasic-flashbasic/mat-statement/)
- [matbuild statement](https://d3codex.com/pickbasic-flashbasic/matbuild-statement/)
- [matparse statement](https://d3codex.com/pickbasic-flashbasic/matparse-statement/)
- [matread statement](https://d3codex.com/pickbasic-flashbasic/matread-statement/)
- [matreadu statement](https://d3codex.com/pickbasic-flashbasic/matreadu-statement/)
- [matwrite statement](https://d3codex.com/pickbasic-flashbasic/matwrite-statement/)
- [write statement](https://d3codex.com/pickbasic-flashbasic/write-statement/)

---
Source: https://d3codex.com/pickbasic-flashbasic/matwriteu-statement/ - part of the D3Codex reference.
