š„® mooncakes.io
Modules
Skills
CLI
Build queue
Switch page
Modules
Skills
CLI
Build queue
Search
Sign in
0.2.4 (latest)
0.2.4 (latest)
0.2.3
0.2.2
0.2.1
0.2.0
0.1.1
0.1.0
Expand all
Collapse all
README
cli
/
expr
Find API in this module
/
Collapse all documentation
expr
expr command for MoonX.
command-line
moonx
wasm
moon add cli/expr@0.2.4
Download zip
Author
cli
Version
0.2.4
License
Apache-2.0
Repository
github.com/moonbit-community/cmd
Last updated
8 hours ago
Downloads
135
Dependencies (3)
cli/core
0.11.1
moonbitlang/async
0.22.9
moonbitlang/x
0.5.7
Dependents (0)
No dependents
#
expr
Evaluate integer, string and basic-regex expressions through MoonX.
#
Usage
moonx cli/expr 7 + 5 moonx cli/expr abc : 'a\(.*\)'
Pass operators and operands as separate arguments. Output the result; status distinguishes a nonzero/nonempty result, a zero/empty result and errors.
#
Common options
Option
Description
--help
Show help.
--version
Show the version.
#
Notes
Uses the documented C-byte expression grammar, not a general-purpose language. Quote operators that the invoking shell would interpret.
See the
compatibility guide
for the supported profile.
Source Files
main.mbt
Install
moon add cli/expr@0.2.4
Download zip
expr command for MoonX.
command-line
moonx
wasm
cli
Apache-2.0
github.com/moonbit-community/cmd
Updated 8 hours ago
135 downloads
Dependencies (3)
cli/core
0.11.1
moonbitlang/async
0.22.9
moonbitlang/x
0.5.7
Dependents (0)
No dependents