TAILIEUCHUNG - Microsoft WSH and VBScript Programming for the Absolute Beginner Part 15

Microsoft WSH and VBScript Programming for the Absolute Beginner by Jerry Lee Ford Part 15. If you are new to programming with Microsoft WSH and VBScript and are looking for a solid introduction, this is the book for you. Developed by computer science professors, books in the for the absolute beginner series teach the principles of programming through simple game creation. You will acquire the skills that you need for more practical WSH and VBScript programming applications and will learn how these skills can be put to use in real-world scenarios. Best of all, by the time you finish this book,. | Microsoft WSH and VBScript Programming for the Absolute Beginner Second Edition The first four calculations should be fairly easy to understand. In the first calculation I took the value of intMyAge and added 1 to it. Similarly I subtracted 1 in the next calculation and then multiplied intMyAge times 2 in the third statement. The final calculation requires a little more explanation. You may have been surprised by this calculation s result. At first glance it appears that VBScript will try to solve the equation as follows Step 1 Divide intMyAge which is currently 74 by 5 yielding Step 2 Add to 3 getting . Step 3 Multiple and 10 getting as the final result 178 However VBScript says that the answer is actually . How could this be The answer lies in something called the order of precedence which tells VBScript the order in which to perform individual calculations within an equation or expression. Table outlines the order in which VBScript order of precedence occurs. Table Order of Precedence for VBScript Arithmetic Operators Operator Description A Exponentiation - Negation Multiplication Division Integer division Mod Modulus Addition - Subtraction Note Operators appearing at the beginning of the table have precedence over operators appearing later in the table. Chapter 4 Constants Variables and Arrays Exponentiation occurs before negation. Negation occurs before multiplication and so on. So when applied to the last calculation in the previous example VBScript solves the equation as follows Step 1 Multiple 3 10 to get 30 Step 2 Divide intMyAge by 5 to get Step 3 Add to 30 getting the final result of You can add parentheses to your VBScript expressions to exercise control over the order in which individual calculations are performed. For example you could rewrite the last expression in the previous example as follows inMyAge intMyAge 5 3 10 VBScript now performs individual calculation located within parentheses first like .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.