# fl command

The fl BASIC program forms a single
list from two lists using intersection, union, or exclusion operators.

## Syntax

```
 fl file.reference1 list1{operators} {file.reference2} {list2}
fl ?
```

## Parameter(s)

| list1 | First list. | |
| --- | --- | --- |
| list2 | Second list. | |
| operators | = | Indicates an intersection. Forms list of matching items. |
| + | Indicates a union. Forms list of nonduplicate items. | |
| - | Indicates an exclusion. Forms list of items not in list2. | |
| ? | Displays help text on the screen. | |
If *file.reference2* is not specified,
it is assumed to be the same as *file.reference1*. If *list2* is not specified, it is assumed to
be the same as *list1*. If neither *file.reference2* nor list 2 are specified, the effect is the same as a get-list. The created list overlays *list1* in *file.reference1*.

## Example(s)

**Example 1**

Creates a list of all sports fans from both lists:

```
 fl pointer-file football.fans + baseball.fans
```

 **Example 2**

Creates a list of those who enjoy both sports:

```
fl pointer-file football.fans = baseball.fans
```

 **Example 3**

Creates a list of those who like football only:

```
fl pointer-file football.fans - baseball.fans
```

## See also

- [Active list](https://d3codex.com/definitions/active-list/)
- [compare-list command](https://d3codex.com/tcl/compare-list-command/)
- [copy-list command](https://d3codex.com/tcl/copy-list-command/)
- [delete-list command](https://d3codex.com/tcl/delete-list-command/)
- [edit-list command](https://d3codex.com/tcl/edit-list-command/)
- [get-list command](https://d3codex.com/tcl/get-list-command/)
- [nselect command](https://d3codex.com/access/nselect-command/)
- [readnext statement](https://d3codex.com/pickbasic-flashbasic/readnext-statement/)
- [save-list command](https://d3codex.com/tcl/save-list-command/)
- [Secondary list](https://d3codex.com/definitions/secondary-list/)
- [sort-list command](https://d3codex.com/tcl/sort-list-command/)

---
Source: https://d3codex.com/tcl/fl-command/ - part of the D3Codex reference.
