공부/ASP

ASP를 위한 VBScript

nokomoko 2011. 5. 13. 16:04
반응형

<%Option explicit%>

<html>
 <body>
<%
Dim intage
Dim intnextage
intage = 10
intnextage = inage + 1

response.write intnextage

%>
 </body>
</html>

<명시적인 변수 선언을 위한 option explict>

위의 소스는 오류가 발생한다.

하지만
<%Option explicit%>을 빼면
1 이라는 결과가 나온다.

inage 변수가 선언되지 않았지만 묵시적으로 선언된 것으로 되어 결과값이 나오게 된다.

Dim 변수
변수 = 변수값

response.write
출력문

반응형