Last active
September 24, 2019 17:49
-
-
Save rediffusion/3f76aca576887bebb3588e78e123f105 to your computer and use it in GitHub Desktop.
NOTE: с числами можно выполнять любого рода вычисления. А ещё ··· деление, округление, постфикс, префикс.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;~ Вычисление - функции `abs` | |
MsgBox % abs(-5) ; получить модуль числа | |
; myNum := -5 | |
; MsgBox % abs(myNum) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;~ Вычисление - функции `round` | |
myNum := -10.123456789 | |
MsgBox % Round(myNum, 5) ; округляем до определённого числа (после 10). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;~ Деление | |
myVar1 := 8 | |
myVar2 := 3 | |
MsgBox % myVar1 / myVar2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;~ вычисление - без остатка // | |
myVar1 := 8 | |
myVar2 := 3 | |
MsgBox % myVar1 // myVar2 | |
;~ MsgBox % floor(myVar1 / myVar2) ; функция floor округляет в меньшую сторону. | |
;~ MsgBox % mod(myVar1, myVar2) ; mod округляет в меньшую сторону. | |
;~ MsgBox % ceil(myVar1 / myVar2) ; функция ceil округляет в большую сторону. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;~ Пример #1 | |
myAge := 18 | |
MsgBox % myAge + 1 | |
;~ Пример #2 | |
myAge := 18 | |
myAge += 1 | |
MsgBox % myAge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;~ Пример #1 | |
myAge := 18 | |
MsgBox % ++myAge | |
;~ Пример #1 | |
myAge := 18 | |
MsgBox % myAge++ | |
MsgBox % myAge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment