*Sharp*BASIC supports the 'shortcut' assignment operators :+ (addition), :- (subtraction), :* (multiplication) and :/ (division).

Example:

Code: Select all

```
dim a:int=5;
main do
a:+5; ' equivalent to "a = a + 5;"
print(a); ' 10
a:-3; ' equivalent to "a = a - 3;"
print(a); ' 7
a:*7; ' equivalent to "a = a * 7;"
print(a); ' 49
a:++; ' equivalent to less optimal "a:+1" and "a = a + 1;"
print(a); ' 50
a:/10; ' equivalent to "a = a / 10;"
print(a); ' 5
end
```