[ Pobierz całość w formacie PDF ]
.On occasion, however, you may need to inquire as to a variables subtype so you can convert it into another format or carry out a certainaction depending on the variable.For example, you may want to execute code differently if the user enters None in a text box versus a value.QArrays look pretty complicated.Will I ever need to use them?AThey might seem complicated to you now, but you will see as you work through this book that not only are they easy to use, but they can also save you a great deal of extra code and make yourprogram a lot easier to write and understand later.WorkshopToday you saw a Web page that makes use of simple variables.Takeone of the code examples in this lesson and create your own Webpage.Once you've got it running, create several variables andassign data to them.Practice displaying the contents of thosevariables on the Web page using MsgBoxand the form button control I have discussed.QuizNoteRefer to Appendix C, "Answers to Quiz Questions," for the answers to these questions.What data type are VBScript variables based on? Can you rememberthe data types you can store inside a variable?Write the code required within a procedure to create a variablefor storing your name with VBScript code.Assign your name tothat variable.Assume you have a variable called Agethat contains an age provided by the user.Write the code thatensures that the user has entered a number as her age.If theuser hasn't entered a number, tell her she needs to enter herage correctly
[ Pobierz całość w formacie PDF ]