<%
'*******************************
'기능 : 쉼표 (str)
'매개 변수 : str, 처리 할 숫자
'저자 : Alixi
'날짜 : 2007/7/12
'설명 : 천분의 숫자 숫자 표시에 형식이 지정된 값을 반환합니다.
'예 : <%= comma ( "120300")%>
'*******************************
functioncomma (str)
ifnot (isnumeric (str)) orstr = 0then
결과 = 0
elseiflen (fix (str)) <4then
결과 = str
또 다른
pos = instr (1, str, ".")
ifpos> 0then
Dec = mid (str, pos)
endif
res = strreverse (fix (str))
루프 카운트 = 1
whileloopcount <= len (res)
tempresult = tempresult+Mid (Res, Loopcount, 3)
루프 카운트 = 루프 카운트+3
ifloopcount <= len (res)
tempresult = tempresult+","
endif
향하게 하다
결과 = strreverse (tempresult)+12 월
endif
comma = 결과
최종 기능 장애
%>