Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,17 @@
|
|||
Procedure.s Strip_comments(Str$)
|
||||
Protected result$=Str$, l, l1, l2
|
||||
l1 =FindString(Str$,"#",1)
|
||||
l2 =FindString(Str$,";",1)
|
||||
;
|
||||
; See if any comment sign was found, prioritizing '#'
|
||||
If l1
|
||||
l=l1
|
||||
ElseIf l2
|
||||
l=l2
|
||||
EndIf
|
||||
l-1
|
||||
If l>0
|
||||
result$=Left(Str$,l)
|
||||
EndIf
|
||||
ProcedureReturn result$
|
||||
EndProcedure
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
#instring1 ="apples, pears # and bananas"
|
||||
#instring2 ="apples, pears ; and bananas"
|
||||
|
||||
PrintN(Strip_comments(#instring1))
|
||||
PrintN(Strip_comments(#instring2))
|
||||
Loading…
Add table
Add a link
Reference in a new issue