|| Or Logical Operator

Continues next operation only if previous operation fails

Description

When in the normal run mode (see “schedulers” link below) this will only run the command on the right hand side if the command on the left hand side does not error. Neither stdout nor stderr are piped.

This has no effect in try nor trypipe run modes because they automatically apply stricter error handling. See detail below.

Examples

When true

Second command does not run because the first command doesn’t error:

» out one || out two
one

When false

Second command does run because the first command produces an error:

» err one || out two
one
two

Detail

This has no effect in try nor trypipe run modes because they automatically apply stricter error handling. You can achieve a similar behavior in try with the following code:

try {
    err one -> !if { out two }
}

There is no workaround for trypipe.

See Also


This document was generated from gen/parser/logical_ops_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.