> For the complete documentation index, see [llms.txt](https://docs.bcbi.brown.edu/codiac-for-health/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bcbi.brown.edu/codiac-for-health/computing/julia/repl.md).

# REPL

<mark style="color:$primary;">Julia comes with a full-featured interactive command-line REPL (read-eval-print loop) built into the</mark> <mark style="color:$primary;"></mark><mark style="color:$primary;">`julia`</mark> <mark style="color:$primary;"></mark><mark style="color:$primary;">executable. In addition to allowing quick and easy evaluation of Julia statements, it has a searchable history, tab-completion, many helpful keybindings, and dedicated help</mark> <mark style="color:$primary;"></mark><mark style="color:$primary;">`?`</mark> <mark style="color:$primary;"></mark><mark style="color:$primary;">and shell modes</mark> <mark style="color:$primary;"></mark><mark style="color:$primary;">`;`</mark><mark style="color:$primary;">.</mark> [\[1\]](#references)&#x20;

This page provides examples of using REPL on the command line.

## Julia REPL Example (local) <a href="#julia_repl_example_local" id="julia_repl_example_local"></a>

* Type `julia` in terminal to launch REPL

<figure><img src="https://content.gitbook.com/content/v4bMBkQ3ZBxkXjskIqBa/blobs/805OZNIgOlnL8JKFfX2V/repl_ex.png" alt="Terminal screen with Julia launched and example commands and output. println(&#x22;hello world!&#x22;) results in hello world!;  word = &#x22;test&#x22; results in &#x22;test&#x22;; typeof(word) results in String; length(word) results in 4; print(word) results in test; exit()"><figcaption></figcaption></figure>

## Julia REPL Help Pages (local) <a href="#julia_repl_help_pages_local" id="julia_repl_help_pages_local"></a>

* Type "?" to enter help pages within REPL
* Type a function from Julia to read help pages (ex: `println`)

<figure><img src="https://content.gitbook.com/content/v4bMBkQ3ZBxkXjskIqBa/blobs/tjg45gmH8MZk2shcHkoN/repl_help.png" alt="Terminal screen with Julia help launched. Type &#x22;?&#x22; for help. From the help?> prompt,  println results in help page for println."><figcaption></figcaption></figure>

## References

1. Julia Contributors. (n.d.). [REPL - Standard Library - Julia Language](https://docs.julialang.org/en/v1/stdlib/REPL/). Retrieved May 1, 2024.&#x20;

## Resources <a href="#documentation" id="documentation"></a>

* Julia Documentation: [The Julia REPL](https://docs.julialang.org/en/v1/stdlib/REPL/)
* [Julia Cheat Sheet](https://juliadocs.github.io/Julia-Cheat-Sheet/) (see REPL)
* [Practice with this web-based Julia REPL](https://julialang.org/learning/tryjulia/)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.bcbi.brown.edu/codiac-for-health/computing/julia/repl.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
