Measures Concepts
GitHub icon

basic calculator

basic calculator - Programming language

< >

basic calculator, aka basic calculator, is a programming language created in 1975.

#1091on PLDB 49Years Old

Try now: Riju · TIO

bc, for basic calculator (often referred to as bench calculator), is "an arbitrary-precision calculator language" with syntax similar to the C programming language. bc is typically used as either a mathematical scripting language or as an interactive mathematical shell. A typical interactive usage is typing the command bc on a Unix command prompt and entering a mathematical expression, such as (1 + 3) * 2, whereupon 8 will be output. Read more on Wikipedia...


Example from Riju:
"Hello, world! "
Example from hello-world:
"Hello World"
Example from Wikipedia:
$ result=$(echo "scale=2; 5 * 7 /3;" | bc) $ echo $result 11.66

Language features

Feature Supported Token Example
Comments ✓
MultiLine Comments ✓
Strings ✓ "
"Hello world"

View source

- Build the next great programming language · Search · Add Language · Features · Creators · Resources · About · Blog · Acknowledgements · Queries · Stats · Sponsor · Day 605 · feedback@pldb.io · Logout