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

Microsoft WSH and VBScript Programming for the Absolute Beginner by Jerry Lee Ford Part 29. 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 Developing the Logic for the Main Processing Section The script s main processing section controls the overall execution of the script. It consists of 10 function calls and two loops SetVariableDefaults ProcessScriptIniFile CollectPlayerInput For intSetCount 1 to intNoOfPlays Do Until blnAllNumbersPicked True GetRandomNumber ProcessRandomNumber DetermineIfSetIsComplete Loop BuildDisplayString ResetVariableDefaults Next DisplayFinalResults DisplaySplashScreen The first loop is controlled by a For statement that is responsible for making sure that the script generates the number of sets of lottery numbers specified by the player. The second loop is controlled by a Do Until and is responsible for making sure that a full count of numbers is generated for each set or play . Chapter 8 Storing and Retrieving Data Building the SetVariableDefaults Function The SetVariableDefaults function shown here is responsible for establishing default values for a number of variables used by the script. The first two variables are Boolean and are used to determine when a full set of lottery numbers has been generated and when the player has specified a valid number of plays. The second pair of variables is used to store integer data. The first variable is used to keep track of the number of lottery numbers generated for each play. The second variable is used to track the number of sets of lottery numbers as the script is generating them. Function SetVariableDefaults blnAllNumbersPicked False blnInputValidated False intNumberCount 0 intNoOfValidPicks 0 End Function Building the ProcessScriptIniFile Function The ProcessScriptIniFile function shown here is responsible for reading in script configuration settings from the game s INI file. Because of the unique task assigned to this function I chose to make it completely self contained. Therefore it begins by defining its own objects and variables. To make the .

Đã 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.