Code that reads like English. Runs like machine code.
Ardo is a small, honest programming language. You write sentences; Ardo turns them into real machine code, with no hidden runtime and no garbage collector.
- Reads like English.
if round is greater than 1000:means exactly what it says. - Real machine code. Programs are small native files that start instantly.
- Built from scratch. Ardo began as hand-written assembly and now compiles itself, byte for byte.
-- coffee.ar: what does a round of coffee cost?
cost:
take cups as number, price as number
gives number
return cups * price
let round be cost(3, 450) -- in cents, so money stays exact
if round is greater than 1000:
output "That's a big round: ", round, " cents", newline
else:
output "Coffee's on me: ", round, " cents", newline
$ ardo coffee.ar
That's a big round: 1350 cents