Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,21 @@
|
|||
arraybase 1
|
||||
dim s$(4)
|
||||
s$[1] = "apples, pears # and bananas"
|
||||
s$[2] = "apples, pears ; and bananas"
|
||||
s$[3] = "# this is a comment"
|
||||
s$[4] = " # this is a comment with leading whitespace"
|
||||
|
||||
for i = 1 to 4
|
||||
call stripComment(s$[i], "#;")
|
||||
print s$[i], " => Length = "; length(s$[i])
|
||||
next i
|
||||
end
|
||||
|
||||
subroutine stripComment(s$, commentMarkers$)
|
||||
if s$ = "" then return
|
||||
i = instr(s$, commentMarkers$)
|
||||
if i > 0 then
|
||||
s$ = left$(s$, i - 1)
|
||||
s$ = trim(s$) # removes both leading and trailing whitespace
|
||||
end if
|
||||
end subroutine
|
||||
Loading…
Add table
Add a link
Reference in a new issue