filmov
tv
VBScript Basics, Part 46 | Math Functions

Показать описание
VBScripting (.vbs) Basic tutorial on how to use basic math functions such as addition, subtraction, multiplication, division, absolute value, getting rid of decimals, rounding off decimals, greater than, and less than signs, random numbers, etc...
Code Example: (Brackets are not allowed. Watch the video for the code on greater than and less than signs.)
___
a = 5
b = 3
c = 3
MsgBox a + b ,, "5 plus 3"
MsgBox a - c ,, "5 minus 3"
MsgBox b / a ,, "3 divided by 5"
MsgBox a * c ,, "5 times 3"
MsgBox Int(5.298723) ,, "Cuts off decimals of: 5.298723"
MsgBox Int(5.862987) ,, "Cuts off decimals of: 5.862987"
MsgBox Round(5.298723) ,, "Rounds off decimals of: 5.298723"
MsgBox Round(5.862987) ,, "Rounds off decimals of: 5.862987"
MsgBox Abs(-3) ,, "Absolute value of -3"
Randomize
MsgBox Int(10*Rnd) ,, "Random number between 0 and 10"
___
Code Example: (Brackets are not allowed. Watch the video for the code on greater than and less than signs.)
___
a = 5
b = 3
c = 3
MsgBox a + b ,, "5 plus 3"
MsgBox a - c ,, "5 minus 3"
MsgBox b / a ,, "3 divided by 5"
MsgBox a * c ,, "5 times 3"
MsgBox Int(5.298723) ,, "Cuts off decimals of: 5.298723"
MsgBox Int(5.862987) ,, "Cuts off decimals of: 5.862987"
MsgBox Round(5.298723) ,, "Rounds off decimals of: 5.298723"
MsgBox Round(5.862987) ,, "Rounds off decimals of: 5.862987"
MsgBox Abs(-3) ,, "Absolute value of -3"
Randomize
MsgBox Int(10*Rnd) ,, "Random number between 0 and 10"
___
VBScript Basics, Part 46 | Math Functions
VBScript Basics, Part 47 | Formatting Numbers & Dates
VBScript Basics, Part 45 | Adding to an Array (Arrays)
VBScript Basics, Part 60 | Multidimensional Arrays (Arrays)
VBScript Basics, Part 44 | Creating Arrays (Arrays)
VBScript Basics, Part 48 | Repeating Characters - String() - Space()
VBScript Basics, Part 43 | LCase - UCase - Trim
VBScript Basics, Part 40 | Date Functions
VBScript Basics, Part 50 | Dropped Files - Folders (Arguments)
VBScript Basics, Part 49 | TypeName - VarType - IsTests
VBScript Basics, Part 66 | Multiline String Formatter (create code with code)
VBScript Basics, Part 24 | Replace Lines (Replace Command)
VBScript Basics, Part 54 | Unzip - Extract Compressed Files
Урок 13 VBScript Обработка ошибок (On Error Resume Next)
Vbscript Tutorial: Create A Script That Generates A Random Number
Learn Excel VBA to Automate Anything
ArcGIS 10.2 - Create Random Values - VBScript - Field Calculator
VBScript Tutorial: Lesson 1 Starting Off
Vbscript Tutorial: Create A Script That Says your Birthdate
Find Windows 11/10 Product Key using VB Script. I wish I had known this earlier!
VBScript Requests » Part 3 | Change User Password
VBScript Basics, Part 15 | Copy - Move - Rename - Files & Folders
VBScript Requests » Part 6 | Clipboard Grab
VBScript to Keep Refreshing a Web Page
Комментарии