ASP ClassicLesson 29Free preview
ASP Variables
This lesson is part of ASP · All levels
Summary
The Classic ASP variable is declared with the Dim keyword and can store text, numbers, dates, or objects. By default VBScript uses a Variant type that adjusts the type of data stored, so the initial value of the unfilled variable is Empty. Enabling the Explicit Option at the beginning of the file forces each variable to be declared and presses typing errors.
Key points
- The declaration uses Dim's name and is local in nature in the procedure.
- Variant type is a flexible built-in type that can accommodate a variety of data.
- The newly declared variable contains an empty value.
- The Explicit option requires declaration so typo is detected faster.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.