# Examples

The `examples/` directory contains annotated REXX programs. Each file includes a header comment explaining what it demonstrates.

## Running examples

```bash
rexx examples/hello.rexx
rexx examples/fizzbuzz.rexx
```

## Index

| File | Demonstrates |
|------|-------------|
| `hello.rexx` | SAY output, simplest possible program |
| `fizzbuzz.rexx` | DO loop, IF/THEN/ELSE, modulo (//) |
| `factorial.rexx` | CALL, RETURN, PROCEDURE, ARG, recursion |
| `fibonacci.rexx` | DO controlled loop, stem variables |
| `arithmetic.rexx` | NUMERIC DIGITS, large number computation |
| `strings.rexx` | String BIFs (SUBSTR, POS, TRANSLATE, etc.) |
| `words.rexx` | Word BIFs (WORD, WORDS, SUBWORD, etc.) |
| `parse_demo.rexx` | PARSE VAR templates: word split, literal patterns, positional |
| `select_menu.rexx` | SELECT/WHEN/OTHERWISE dispatch |
| `stem_arrays.rexx` | Stem/compound variables as arrays |
| `conversions.rexx` | D2X, X2D, C2D, D2C, C2X, X2C, B2X, X2B |
| `signal_traps.rexx` | SIGNAL ON SYNTAX/NOVALUE, CONDITION() BIF |
| `interpret_calc.rexx` | INTERPRET for dynamic code evaluation |
| `address_shell.rexx` | ADDRESS SYSTEM, shell commands, RC |
| `queues.rexx` | PUSH, QUEUE, PULL, QUEUED() |
| `trace_demo.rexx` | TRACE RESULTS/INTERMEDIATES, output tags, TRACE() BIF |
| `log_parser.rexx` | Log line parsing, stem counters, SELECT/WHEN filtering |
| `csv_processor.rexx` | CSV parsing, column statistics, department aggregation |
| `file_renamer.rexx` | Batch rename planner: TRANSLATE, PARSE, string cleanup |
