# Nonfatal error condition

A nonfatal error condition is a type of error that occurs
when a BASIC program encounters a condition that is resolved by the
BASIC run-time package, although not to the specific need of the program
line of code.

The most common occurrence of this is the message:

```
Variable has not been assigned a value, zero used.
```
In BASIC, this occurs if a reference is made to a variable
on the right side of an `=` before being referenced
(assigned) on the left side of an `=`. However, in
FlashBASIC, the simple assignment of a variable does not check for
its value. The value is only checked when used (for example, `crt x`). The assignment of variables in FlashBASIC is done
by reference, rather than by value.

## Example(s)

```
dim array(15)
for i = 1 to 15
array(i) = x
next
```
In BASIC this results in 15 nonfatal error messages:

```
[B10] in program "name", Line 3:
Variable has not been assigned a value; zero used.
```
In FlashBASIC it does not result in any nonfatal errors.
 If the array were to be used as a parameter to a BASIC statement
or function at that time, the nonfatal error would occur.

```
dim array(15)
for i = 1 to 15
array(i) = x
next
*
*
crt array(7)
```
In FlashBASIC this results in one nonfatal
error message:

```
[B10] in program "name", Line 7:
Variable has not been assigned a value; zero used.
```

## See also

- [# command](https://d3codex.com/flashbasicdebugger/pound-command/)
- [Array variable](https://d3codex.com/pickbasic-flashbasic/array-variable/)
- [BASIC/FlashBASIC Debugger](https://d3codex.com/flashbasicdebugger/basic-flashbasic-debugger/)
- [Error condition](https://d3codex.com/pickbasic-flashbasic/error-condition/)
- [l command (FlashBASIC Debugger)](https://d3codex.com/flashbasicdebugger/l-command-flashbasic-debugger/)
- [run command](https://d3codex.com/tcl/run-command/)
- [b command (FlashBASIC Debugger)](https://d3codex.com/flashbasicdebugger/b-command-flashbasic-debugger/)

---
Source: https://d3codex.com/pickbasic-flashbasic/nonfatal-error-condition/ - part of the D3Codex reference.
