Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,45 @@
|
|||
global CRLF$
|
||||
CRLF$ =chr$( 13) +chr$( 10)
|
||||
|
||||
sample$ =" /**"+CRLF$+_
|
||||
" * Some comments"+CRLF$+_
|
||||
" * longer comments here that we can parse."+CRLF$+_
|
||||
" *"+CRLF$+_
|
||||
" * Rahoo "+CRLF$+_
|
||||
" */"+CRLF$+_
|
||||
" function subroutine() {"+CRLF$+_
|
||||
" a = /* inline comment */ b + c ;"+CRLF$+_
|
||||
" }"+CRLF$+_
|
||||
" /*/ <-- tricky comments */"+CRLF$+_
|
||||
""+CRLF$+_
|
||||
" /**"+CRLF$+_
|
||||
" * Another comment."+CRLF$+_
|
||||
" */"+CRLF$+_
|
||||
" function something() {"+CRLF$+_
|
||||
" }"+CRLF$
|
||||
|
||||
startDelim$ ="/*"
|
||||
finishDelim$ ="*/"
|
||||
|
||||
print "________________________________"
|
||||
print sample$
|
||||
print "________________________________"
|
||||
print blockStripped$( sample$, startDelim$, finishDelim$)
|
||||
print "________________________________"
|
||||
|
||||
end
|
||||
|
||||
function blockStripped$( in$, s$, f$)
|
||||
for i =1 to len( in$) -len( s$)
|
||||
if mid$( in$, i, len( s$)) =s$ then
|
||||
i =i +len( s$)
|
||||
do
|
||||
if mid$( in$, i, 2) =CRLF$ then blockStripped$ =blockStripped$ +CRLF$
|
||||
i =i +1
|
||||
loop until ( mid$( in$, i, len( f$)) =f$) or ( i =len( in$) -len( f$))
|
||||
i =i +len( f$) -1
|
||||
else
|
||||
blockStripped$ =blockStripped$ +mid$( in$, i, 1)
|
||||
end if
|
||||
next i
|
||||
end function
|
||||
Loading…
Add table
Add a link
Reference in a new issue