home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 9 / IOPROG_9.ISO / contrib / iis4 / iis4_07.cab / Variables_VBScript.asp < prev    next >
Encoding:
Text File  |  1997-09-03  |  1.6 KB  |  90 lines

  1. <%@ LANGUAGE = VBScript %>
  2. <%  Option Explicit     %>
  3.  
  4. <HTML>
  5.     <HEAD>
  6.         <TITLE>Variable Sample</TITLE>
  7.     </HEAD>
  8.  
  9.     <BODY BGCOLOR="White" topmargin="10" leftmargin="10">
  10.  
  11.  
  12.         <!-- Display Header -->
  13.  
  14.         <font size="4" face="Arial, Helvetica">
  15.         <b>Variable Sample</b></font><br>
  16.       
  17.       
  18.         <hr>
  19.         <H3> Integer Manipulaiton </h3>
  20.  
  21.         <%
  22.             ' Declare variable
  23.             Dim intVariable
  24.  
  25.             ' Assign the variable an integer value
  26.             intVariable = 5
  27.         %>
  28.  
  29.  
  30.         <P><%=intVariable%> + <%=intVariable%> =
  31.         <%=intVariable + 5%></p>
  32.  
  33.  
  34.         <HR>
  35.         <H3> String Manipulation </h3>
  36.  
  37.         <%
  38.             ' Declare variable
  39.             Dim strVariable
  40.  
  41.             ' Assign the variable a string value
  42.             strVariable = "Jemearl"
  43.         %>
  44.  
  45.         <P>This example was done by:
  46.         <%=strVariable + " Smith" %></p>        
  47.  
  48.  
  49.         <HR>
  50.         <H3> Boolean Manipulation </h3>
  51.  
  52.         <%
  53.             ' Declare variable
  54.             Dim blnVariable
  55.  
  56.             ' Assign the variable a boolean value
  57.             blnVariable = true
  58.             
  59.             If (blnVariable = True) Then
  60.                 Response.Write "<P>The boolean value is true.</p>"
  61.             Else
  62.                 Response.Write "<P>The boolean value is False.</p>"
  63.             End If
  64.         %>
  65.  
  66.  
  67.         <HR>
  68.         <H3> Date and Time </h3>
  69.  
  70.         <%
  71.             ' Declare variable
  72.             Dim dtmVariable
  73.  
  74.             ' Assign the variable a value
  75.             dtmVariable = #08 / 27 / 97 5:11:00pm#
  76.         %>
  77.  
  78.         <P>The date and time is <%=dtmVariable%> </p>
  79.  
  80.         <%
  81.             ' Set the variable to the web server date and time
  82.             dtmVariable = Now
  83.         %>
  84.  
  85.         <P>The <STRONG>system</strong> date and time is
  86.         <%=dtmVariable%></p>
  87.  
  88.     </BODY>
  89. </HTML>
  90.