[鸟哥笔记]简单好用的计算器bc

bc是一种支持任意精度数字的交互式执行语言,语法类似C语言。它可通过命令行选项定义标准数学库,并依次处理命令行中列出的所有文件。本文档详细介绍了bc版本1.06的使用方法和选项。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

-bash-3.2$ man bc
bc(1)                                                                    bc(1)

NAME
       bc - An arbitrary precision calculator language

SYNTAX
       bc [ -hlwsqv ] [long-options] [  file ... ]

VERSION
       This man page documents GNU bc version 1.06.

DESCRIPTION
       bc is a language that supports arbitrary precision numbers with interactive execution of statements.  There are some similarities
       in the syntax to the C programming language.  A standard math library is available by command line  option.   If  requested,  the
       math  library is defined before processing any files.  bc starts by processing code from all the files listed on the command line
       in the order listed.  After all files have been processed, bc reads from the standard input.  All code is executed as it is read.
       (If a file contains a command to halt the processor, bc will never read from the standard input.)

       This  version of bc contains several extensions beyond traditional bc implementations and the POSIX draft standard.  Command line
       options can cause these extensions to print a warning or to be rejected.  This document describes the language accepted  by  this
       processor.  Extensions will be identified as such.

   OPTIONS
       -h, --help
              Print the usage and exit.

       -i, --interactive
              Force interactive mode.

       -l, --mathlib
              Define the standard math library.

       -w, --warn
              Give warnings for extensions to POSIX bc.

       -s, --standard
              Process exactly the POSIX bc language.

       -q, --quiet
              Do not print the normal GNU bc welcome.

       -v, --version
              Print the version number and copyright and quit.
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值