# $chain statement

The $chain statement continues FlashBASIC
or BASIC compilation in a different source item.

## Syntax

```
$chain {file.ref} item-ID
```

## Description

When *file.ref* is omitted, the current file is assumed.

There is no limit
to the number of $chain statements, but any statements
after a $chain statement is ignored.

Note: When
statements are accessed with the $chain statement,
the corresponding source lines are not visible from the FlashBASIC
or BASIC Debugger.

## Example(s)

```
bp myprog
003 equ bell to char(7)
004 equ am to char(254), vm to char(253), svm to char(252)
005 open "cust" to customer.file
006 $chain prog
 
bp prog
002 read item1 from customer.file,"01234" else print bell
```

## See also

- [$include statement](https://d3codex.com/pickbasic-flashbasic/dollar-include-statement/)
- [call statement](https://d3codex.com/pickbasic-flashbasic/call-statement/)
- [common statement](https://d3codex.com/pickbasic-flashbasic/common-statement/)
- [data statement](https://d3codex.com/pickbasic-flashbasic/data-statement/)
- [enter statement](https://d3codex.com/pickbasic-flashbasic/enter-statement/)
- [execute statement (UNIX)](https://d3codex.com/pickbasic-flashbasic/execute-statement-unix/)
- [get statement](https://d3codex.com/pickbasic-flashbasic/get-statement/)
- [input statement](https://d3codex.com/pickbasic-flashbasic/input-statement/)
- [precision statement](https://d3codex.com/pickbasic-flashbasic/precision-statement/)
- [run command](https://d3codex.com/tcl/run-command/)
- [send statement](https://d3codex.com/pickbasic-flashbasic/send-statement/)
- [statement blocks](https://d3codex.com/pickbasic-flashbasic/statement-blocks/)
- [Statements and functions](https://d3codex.com/pickbasic-flashbasic/statements-and-functions/)
- [tcl statement](https://d3codex.com/pickbasic-flashbasic/tcl-statement/)
- [then/else statement blocks](https://d3codex.com/pickbasic-flashbasic/then-else-statement-blocks/)
- [ud0ba user exit](https://d3codex.com/pickbasic-flashbasic/ud0ba-user-exit/)

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