Recommended: ASP 3.0 Advanced Programming (42) 5. Return value processing of function return values is different from that of stored procedure return values, which often leads to confusion. In functions, a Boolean value is often returned to indicate whether the function runs successfully or not. If SomeFunctionName() = True Then' Function success
| The following is the quoted content: 000000000000000000000000000000000000000000000000000000000000000 <% Function Comma(str) If Not(IsNumeric(str)) Or str = 0 Then Results = 0 ElseIf Len(Fix(str)) < 4 Then Result = str Else Pos = Instr(1,str,.) If Pos > 0 Then Dec = Mid(str,Pos) End if Res = StrReverse(Fix(str)) LoopCount = 1 While LoopCount <= Len(Res) TempResult = TempResult Mid(Res,LoopCount,3) LoopCount = LoopCount 3 If LoopCount <= Len(Res) Then TempResult = TempResult, End If Wend Result = StrReverse(TempResult) Dec End If Comma = Result End Function %> <html> <body> <% aLongNumber = 12345678 %> An un-formatted number: <%=aLongNumber%><br> The Comma formatted number: <%=Comma(aLongNumber)%> </body> </html> |
Share: Use ASP to implement the online examination system With the development of Internet technology, online teaching will become the main form of people's re-education and lifelong education. In online schools, people can choose any course anywhere, anywhere without being restricted by time and space. The development of online schools proposes the development of online examinations