Skip to content

Cannot use functions in REPL (juliaconsole environment) defined in juliaverbatim environment. #33

@JamieMair

Description

@JamieMair

I have an algorithm defined as follows:

\begin{algorithm}
\begin{juliaverbatim}
function my_large_sum()
    s = 0
    for i=1:100000000000
        s += i
    end
    return s
end
\end{juliaverbatim}
\end{algorithm}

This algorithm is rendered correctly and I can use it in tests, but not in the console environment:

\begin{juliaconsole}
import BenchmarkTools: @btime;
@btime my_large_sum()
\end{juliaconsole}

Doing this produces the following:
image

How can I access these functions in the console space?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions