all tasks
This commit is contained in:
parent
b83f433714
commit
68f8f3e56b
14735 changed files with 178959 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