Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

The Final TUI

When you launch final from the command line or your GUI you should see the following Terminal User Interface TUI (with empty text boxes.) You can resize your terminal, and the TUI will automatically resize. (Note: the TUI will also work, with some limitations, over ssh.)

Let’s take a quick look at the TUI, starting from the bottom:

Shortcut Bar This bar shows the shortcut key combinations for the most used commands. Mac users: note that Ctrl is used instead of the Cmd key.

Prompt Area This is where you enter Final commands, or code. Enter sends the current text in the area. You can use Ctrl-J to add new lines without sending. And if you Paste text from an editor, with newlines, it won’t send until you hit Enter or press Send.

History Area This shows a running list of the prompts you sent. You can copy code from this text area.

Response Area This shows the result of a Send. If the result contained no text, “(ok)” is printed, as confirmation. Just like History, you can copy text from this text area.

Menu Bar This contains 2 particularly useful commands:

File/Load – let’s you browse for a .fnl file, which is loaded (compiled); Help/Words – this will get you started with Final’s built-in help

Example conventions used in this guide

Code examples in this guide do not try to depict the TUI–this would be both wasteful of screen space, and impossible to copy from. Instead, we use a pseudo bare command line interface that looks like this:

> 1 2 + $

3
  • the text after > and any non-empty lines below are the prompt
  • a blank line
  • the expected output of the prompt, which may be many lines; or (ok) if no output is expected

Working along with the examples, you can either type into the TUI Prompt area, or copy/paste.

On to some code!