Include / Evaluate Murex Code (source)

Import Murex code from another file or 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

See Also


This document was generated from builtins/core/management/source_doc.yaml.

This site's content is rebuilt automatically from murex's source code after each merge to the master branch. Downloadable murex binaries are also built with the website.

Last built on Tue Dec 10 22:56:57 UTC 2024 against commit 60f05a260f05a227caf73dd5b3478e3cb3f4bb24e46745b.

Current version is 6.4.1005 (develop) which has been verified against tests cases.