Skip to content

Arithmetic

Bill Hails edited this page Oct 21, 2018 · 8 revisions
2 + 2;

Unsurprisingly, the result is 4. Because PyScheme is reading, evaluating and printing expressions individually in a loop, it needs a semicolon in this top level expression to signify the end of an expression. For example:

2 + 2
+ 2; // 6

Standard operators are

  • + addition
  • - subtraction and unary negation
  • * multiplication
  • / division
  • % modulus
  • ** exponentiation

Currently F♮ only supports integer arithmetic but that is likely to change soon.

Up: Home

Next: Boolean Operations

Clone this wiki locally