source
Less than 1 minute
source
Import Murex code from another file of code block
Description
source
imports code from another file or code block. It can be used as either an "import" / "include" directive (eg Python, Go, C, etc) or an "eval" (eg Python, Perl, etc).
Usage
Execute source from STDIN
<stdin> -> source
Execute source from a file
source: filename.mx
Execute a code block from parameter
source: { code-block }
Examples
Execute source from stdin:
» tout: block { out: "Hello, world!" } -> source
Hello, world!
Execute source from file:
» tout: block { out: "Hello, world!" } |> example.mx
» source: example.mx
Hello, world!
Execute a code block from parameter
» source { out: "Hello, world!" }
Hello, world!
Synonyms
source
.
See Also
args
: Command line flag parser for Murex shell scriptingautocomplete
: Set definitions for tab-completion in the command lineconfig
: Query or define Murex runtime settingsexec
: Runs an executablefexec
: Execute a command or function, bypassing the usual order of precedence.function
: Define a function blockmurex-parser
: Runs the Murex parser against a block of codeprivate
: Define a private function blockruntime
: Returns runtime information on the internal state of Murexversion
: Get Murex version