subtraction

There are no ++ or -- operators in Scala (use += or -=)

In Scala there are no ++ or -- operators. You should instead use the += and -= operators, as shown below. First the += operator:

scala> var i = 1
i: Int = 1

scala> i++
<console>:9: error: value ++ is not a member of Int
              i++
               ^

scala> i += 1

scala> println(i)
2

Next the -= operator:

AppleScript math: Addition, subtraction, multiplication, division

AppleScript math FAQ: Can you show some examples of basic AppleScript math operations, like addition, subtraction, multiplication, and division?

Sure, let's take a look at some AppleScript math examples.

AppleScript addition syntax/examples

To add a few numbers together just use the normal set syntax and the + operator, like this AppleScript addition example:

set one to 1
set two to 2
set answer to one + two
display dialog answer

That example displays the number 3.