Linux command
numbat 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Start the interactive calculator
numbat
Evaluate an expression
numbat -e "[expression]"
Convert between units
numbat -e "5 km -> miles"
Run a numbat script file
numbat [path/to/script.nbt]
说明
numbat is a statically typed programming language for scientific computations with first-class support for physical dimensions and units. It functions as both a powerful calculator and a scripting language. Units can be entered in various formats (km/h, kilometer/hour, GiB, gibibytes, m²) and converted using the -> operator. The standard library includes SI, US Customary, Imperial, Nautical, Astronomical, and Atomic unit systems. Custom units can be defined (e.g., `unit bathtub = 150 L`). The interactive REPL supports command history, Ctrl-R search, and tab completion.
参数
- -e _EXPRESSION_
- Evaluate an expression and print the result.
- --no-prelude
- Do not load the standard prelude (math functions, constants, unit definitions).
- --no-pretty
- Disable pretty-printing of expressions in output.
FAQ
What is the numbat command used for?
numbat is a statically typed programming language for scientific computations with first-class support for physical dimensions and units. It functions as both a powerful calculator and a scripting language. Units can be entered in various formats (km/h, kilometer/hour, GiB, gibibytes, m²) and converted using the -> operator. The standard library includes SI, US Customary, Imperial, Nautical, Astronomical, and Atomic unit systems. Custom units can be defined (e.g., `unit bathtub = 150 L`). The interactive REPL supports command history, Ctrl-R search, and tab completion.
How do I run a basic numbat example?
Run `numbat` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -e _EXPRESSION_ do in numbat?
Evaluate an expression and print the result.