File: highlight.asp

package info (click to toggle)
kf6-syntax-highlighting 6.13.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 47,568 kB
  • sloc: xml: 197,750; cpp: 12,850; python: 3,023; sh: 955; perl: 546; ruby: 488; pascal: 393; javascript: 161; php: 150; jsp: 132; lisp: 131; haskell: 124; ada: 119; ansic: 107; makefile: 96; f90: 94; ml: 85; cobol: 81; yacc: 71; csh: 62; erlang: 54; sql: 51; java: 47; objc: 37; awk: 31; asm: 30; tcl: 29; fortran: 18; cs: 10
file content (58 lines) | stat: -rw-r--r-- 1,485 bytes parent folder | download | duplicates (19)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<% 'kate: hl ASP;
if ( instr(request.servervariables("PATH_INFO"),"login.asp") <= 0 and instr(request.servervariables("PATH_INFO"),"inset") <= 0 and instr(request.servervariables("PATH_INFO"),"Data") <= 0 and instr(request.servervariables("PATH_INFO"),"dropDown") <= 0 ) then
	Session("originalRequestedPage") = Request.ServerVariables("PATH_INFO") & "?" & Request.ServerVariables("QUERY_STRING")
end if

function countRecords( rsToCount )
	numRecs = 0

	do until rsToCount.eof
		numRecs = numRecs + 1

		rsToCount.movenext
	loop

	rsToCount.close ' just to make sure nobody
		' tries to operate on the recordset,
		' which has already reached eof

	countRecords = numRecs
end function

function unique( rs, sortColumn ) ' return unique instances of text in sortColumn within rs
	dim sorted()

	redim sorted(1)
	dim i
	i = 0
	do until rs.eof
		if (not find( rs(sortColumn), sorted )) then
			redim preserve sorted(i+1)
			sorted(i) = rs(sortColumn)
		 	i = i + 1
		end if
		rs.MoveNext
	loop

	redim preserve sorted(i-1) ' the function will add an extra blank entry to the array

	rs.Close 	' close the recordset - we'll be using it again - and reset i - well be using it again, too

	unique = sorted
end function

sub testSub( variable ) ' do nothing impressive...
	dim newVar

	newVar = variable

	if ( variable = true )
		response.end
	else %>

<p>We are writing text.</p>
<p class="stuff"><%=newVar%></p>
<p>We have written text and outputted a variable.</p>

<% 	end if
end sub %>