Addition

Addition is commonly thought of as counting or fusing two numbers together. The addition operator in PlayBasic is +

Examples

Add 2 + 2

(1)
\begin{equation} 2 + 2 = sum \end{equation}
sum = 2 + 2
Print sum
Sync
WaitKey

Increment a Number

Adding 1 to a number is called 'incrementing' the number. PlayBasic has a special function Inc() which increments variables.

num = 2
Inc(num)
Print num
Sync
WaitKey

Count to 10

For i = 1 to 10
    Print i
Next
Sync
WaitKey

See Also

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.